|
@@ -35,20 +35,19 @@ App({
|
|
|
if (uid) {
|
|
|
let userInfo = await getMyInfo()
|
|
|
console.log(userInfo,'zzz');
|
|
|
- this.setUser(userInfo)
|
|
|
- this.globalData.userInfo = userInfo
|
|
|
+ this.setUser(userInfo.user)
|
|
|
+ this.globalData.userInfo = userInfo.user
|
|
|
if (getApp().callBack) {
|
|
|
- getApp().callBack();
|
|
|
+ getApp().callBack(userInfo.users);
|
|
|
}
|
|
|
} else {
|
|
|
let userRes = await androidLogin({extOpenId:'1234567',channel:'3016',grade:'PRIMARY_FIRST_GRADE'})
|
|
|
- console.log(userRes,'455');
|
|
|
- this.setUser(userRes)
|
|
|
- wx.setStorageSync('uid', userRes.uid)
|
|
|
- wx.setStorageSync('user', userRes)
|
|
|
- this.globalData.userInfo = userRes
|
|
|
+ this.setUser(userRes.user)
|
|
|
+ wx.setStorageSync('uid', userRes.user.uid)
|
|
|
+ wx.setStorageSync('user', userRes.user)
|
|
|
+ this.globalData.userInfo = userRes.user
|
|
|
if (getApp().callBack) {
|
|
|
- getApp().callBack(userRes);
|
|
|
+ getApp().callBack(userRes.user);
|
|
|
}
|
|
|
}
|
|
|
},
|