修正第一次进入页面无法获取用户资料的bug
This commit is contained in:
parent
4783be16b3
commit
ee465fff75
@ -133,6 +133,11 @@ export default class extends wepy.app {
|
||||
}
|
||||
}
|
||||
getUserInfo() {
|
||||
if (!this.globalData.userInfo) {
|
||||
if (wepy.getStorageSync('userInfo')) {
|
||||
this.globalData.userInfo = JSON.parse(wepy.getStorageSync('userInfo'));
|
||||
}
|
||||
}
|
||||
return this.globalData.userInfo
|
||||
}
|
||||
checkAuthorize() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user