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

直播间登录

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