Commit a5d7c2b6 authored by 黄媛媛's avatar 黄媛媛

直播间登录

parent 28291870
...@@ -81,16 +81,18 @@ ...@@ -81,16 +81,18 @@
</template> </template>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<tabbars></tabbars> <tabbars></tabbars>
</view> </view>
</template> </template>
<script> <script>
import auth from "@/components/auth/index.vue";
import tabbars from '@/components/tabbar/index'; import tabbars from '@/components/tabbar/index';
export default { export default {
components: { components: {
tabbars tabbars,
auth
}, },
data() { data() {
return { return {
...@@ -110,6 +112,8 @@ export default { ...@@ -110,6 +112,8 @@ export default {
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
u:{},
showAuth:false
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -119,7 +123,17 @@ export default { ...@@ -119,7 +123,17 @@ export default {
this.contentHeight = this.$utils.calcContentHeight(c-40) + "px"; this.contentHeight = this.$utils.calcContentHeight(c-40) + "px";
this.initPage(); this.initPage();
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
this.init();
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
}else{
this.init();
}
}, },
methods: { methods: {
...@@ -177,6 +191,15 @@ export default { ...@@ -177,6 +191,15 @@ export default {
this.status = "nomore"; this.status = "nomore";
} }
}, },
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
this.init()
},
//关闭登录窗口
gbAuth(){
this.showAuth=false;
},
}, },
}; };
</script> </script>
......
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