|
|
@ -163,7 +163,6 @@ |
|
|
// 检查当前用户登录状态 |
|
|
// 检查当前用户登录状态 |
|
|
verifyUserInfo(){ |
|
|
verifyUserInfo(){ |
|
|
let userInfo = uni.getStorageSync('userinfo') || {}; |
|
|
let userInfo = uni.getStorageSync('userinfo') || {}; |
|
|
this.userInfo = uni.getStorageSync('userinfo') || {} |
|
|
|
|
|
if(!userInfo.id || !userInfo.nickname || !userInfo.avatar){ |
|
|
if(!userInfo.id || !userInfo.nickname || !userInfo.avatar){ |
|
|
if(this.showLogin){ |
|
|
if(this.showLogin){ |
|
|
this.showLogin = false; |
|
|
this.showLogin = false; |
|
|
@ -174,6 +173,11 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
getUserInfo() { |
|
|
|
|
|
this.$http(this.API.API_SETUSDRINFO).then(res => { |
|
|
|
|
|
this.userInfo = res.data |
|
|
|
|
|
}).catch(err => {}) |
|
|
|
|
|
}, |
|
|
getRecommond() { |
|
|
getRecommond() { |
|
|
this.$http(this.API.API_RECOMMOND,{page: this.page}).then(res => { |
|
|
this.$http(this.API.API_RECOMMOND,{page: this.page}).then(res => { |
|
|
let isPage = res.data.next_page_url == null?false:true; |
|
|
let isPage = res.data.next_page_url == null?false:true; |
|
|
@ -211,6 +215,7 @@ |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.verifyUserInfo() |
|
|
this.verifyUserInfo() |
|
|
this.getRecommond() |
|
|
this.getRecommond() |
|
|
|
|
|
this.getUserInfo() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|