Commit 0b22b10b authored by Mac's avatar Mac

2个列表的登录处理

parent 74303c63
......@@ -122,6 +122,7 @@
</view>
</view>
</u-col>
</u-row>
<u-loadmore
:status="status"
......@@ -131,7 +132,7 @@
:margin-bottom="20"
bg-color="#f6f6f6"
/>
<!-- <view style="width: 100%;height: 30px;"></view> -->
<view style="width: 100%;height: 30px;"></view>
</scroll-view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth" ></auth>
......@@ -246,17 +247,17 @@ export default {
if (options && options.id) {
this.msg.BrandClassId = options.id;
}
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
// this.u = uni.getStorageSync("mall_UserInfo");
// if (!this.u) {
// this.u = {
// nickName: "未登录",
// avatarUrl: "",
// };
// this.showAuth = true;
// } else {
this.GetBrandClassList();
this.getPrizeList();
}
// }
},
......@@ -351,19 +352,19 @@ export default {
});
},
searchHandler(val) {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
// this.u = uni.getStorageSync("mall_UserInfo");
// if (!this.u) {
// this.u = {
// nickName: "未登录",
// avatarUrl: "",
// };
// this.showAuth = true;
// } else {
this.msg.BrandName = val;
this.msg.pageIndex = 1;
this.g = [];
this.init();
}
// }
},
getPrizeList() {
......
......@@ -306,17 +306,17 @@ export default {
if (options && options.FirstStoreTest) {
this.msg.FirstStoreTest = parseInt(options.FirstStoreTest);
}
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
// this.u = uni.getStorageSync("mall_UserInfo");
// if (!this.u) {
// this.u = {
// nickName: "未登录",
// avatarUrl: "",
// };
// this.showAuth = true;
// } else {
this.getTypeList();
this.isauth = true
}
// }
......
......@@ -67,7 +67,7 @@
</style>
<template>
<view class="koraNews">
<view class="koraNewsSearch">
<view class="koraNewsSearch" v-if="isauth">
<u-search
action-text="搜索"
:clearabled="true"
......@@ -157,14 +157,17 @@
/>
</scroll-view>
<tabbars></tabbars>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth" ></auth>
</view>
</template>
<script>
import tabbars from "@/components/tabbar/index";
import auth from "@/components/auth/index.vue";
export default {
components: {
tabbars,
auth
},
data() {
return {
......@@ -175,6 +178,9 @@ export default {
Title: "",
// Type:1
},
showAuth:false,
u:{},
isauth:false,
pageCount: 1,
dataList: [],
loadText: {
......@@ -249,10 +255,31 @@ export default {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.getList(1);
this.getCommpanyStatus();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.getList(1);
this.getCommpanyStatus();
this.isauth = true
}
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.getList(1);
this.getCommpanyStatus();
this.isauth = true
},
//关闭登录窗口
gbAuth() {
this.showAuth = false
},
//获取数据
getList(num) {
if (num == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment