|
@@ -83,13 +83,18 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.userInfo = wx.getStorageSync('userInfo');
|
|
|
+ this.userId = wx.getStorageSync('userId');
|
|
|
//获取用户的登录信息
|
|
|
if (wx.getStorageSync('token')) {
|
|
|
- this.userInfo = wx.getStorageSync('userInfo');
|
|
|
- this.userId = wx.getStorageSync('userId');
|
|
|
this.hasLogin = true
|
|
|
+ getApp().globalData.hasLogin = true
|
|
|
// 获取用户信息详情
|
|
|
this.getUserInfo()
|
|
|
+ } else {
|
|
|
+ this.hasLogin = false
|
|
|
+ getApp().globalData.hasLogin = false
|
|
|
+ this.userInfoDetail = {}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|