|
|
@@ -99,19 +99,20 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- if (this.$u.test.isEmpty(uni.getStorageSync("userId"))) {
|
|
|
+ let userId = uni.getStorageSync("userId")
|
|
|
+ if (this.$u.test.isEmpty(userId)) {
|
|
|
this.isLogin = false;
|
|
|
} else {
|
|
|
this.isLogin = true;
|
|
|
- this.getUserInfo();
|
|
|
+ this.getUserInfo(userId);
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
toAuth() {
|
|
|
window.location.href = authUrl(this.activityId);
|
|
|
},
|
|
|
- getUserInfo() {
|
|
|
- this.$u.api.user.detail({id: this.userId}).then(res => {
|
|
|
+ getUserInfo(userId) {
|
|
|
+ this.$u.api.user.detail({id: userId}).then(res => {
|
|
|
this.userData = res;
|
|
|
})
|
|
|
},
|