diff --git a/src/pages/user/user.vue b/src/pages/user/user.vue index 13ffa64..461280c 100644 --- a/src/pages/user/user.vue +++ b/src/pages/user/user.vue @@ -274,21 +274,22 @@ export default { this.scrollTop = scrollTop }, onLoad() { + const that = this // 判断是否授权 uni.getSetting({ success(res) { console.log('authSetting', res.authSetting) if (res.authSetting['scope.userInfo'] === true) { - this.isAuth = true + that.isAuth = true } else { - this.isAuth = false + that.isAuth = false } }, }) store.dispatch('userRecommand/getRecommandList', { - uid: this.$store.state.user.userInfo.uid, - openid: this.$store.state.user.userInfo.openid, - page: this.pagesnum, + uid: that.$store.state.user.userInfo.uid, + openid: that.$store.state.user.userInfo.openid, + page: that.pagesnum, }) }, onReachBottom() {