|
|
@ -100,7 +100,8 @@ |
|
|
id: '', |
|
|
id: '', |
|
|
tel: '', |
|
|
tel: '', |
|
|
tags: [] |
|
|
tags: [] |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
showLogin: true |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -122,10 +123,11 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
this.getData(); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
onShow(){ |
|
|
|
|
|
|
|
|
onShow(e){ |
|
|
this.verifyUserInfo(); |
|
|
this.verifyUserInfo(); |
|
|
|
|
|
this.getData(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
verifyUserInfo(){ |
|
|
verifyUserInfo(){ |
|
|
@ -135,7 +137,13 @@ |
|
|
// } |
|
|
// } |
|
|
let userInfo = uni.getStorageSync('userinfo') || {}; |
|
|
let userInfo = uni.getStorageSync('userinfo') || {}; |
|
|
if(!userInfo.id || !userInfo.nickname || !userInfo.avatar){ |
|
|
if(!userInfo.id || !userInfo.nickname || !userInfo.avatar){ |
|
|
this.$url('/pages/login/index?type=userinfo'); |
|
|
|
|
|
|
|
|
if(this.showLogin){ |
|
|
|
|
|
this.showLogin = false; |
|
|
|
|
|
this.$url('/pages/login/index?type=userinfo'); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.showLogin = true; |
|
|
|
|
|
this.$url('/pages/index/index', {type: 'switch'}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
getData(){ |
|
|
getData(){ |
|
|
|