|
@@ -108,6 +108,7 @@ function wechatUserIsBind(unionID, nickName) { |
|
@@ -108,6 +108,7 @@ function wechatUserIsBind(unionID, nickName) { |
108
|
userInfo.uid = data.data.uid;
|
108
|
userInfo.uid = data.data.uid;
|
109
|
userInfo.sessionKey = data.data.session_key;
|
109
|
userInfo.sessionKey = data.data.session_key;
|
110
|
userInfo.wechat = app.globalData.userInfo.wechat || '';
|
110
|
userInfo.wechat = app.globalData.userInfo.wechat || '';
|
|
|
111
|
+ console.log('wechatUserIsBind=>', userInfo);
|
111
|
|
112
|
|
112
|
app._removeSync('disableAutoLogin');
|
113
|
app._removeSync('disableAutoLogin');
|
113
|
app.setUserInfo(userInfo);
|
114
|
app.setUserInfo(userInfo);
|
|
@@ -285,6 +286,7 @@ function getPhoneNumber(e) { |
|
@@ -285,6 +286,7 @@ function getPhoneNumber(e) { |
285
|
userInfo.ssouid = res.data.ssouid;
|
286
|
userInfo.ssouid = res.data.ssouid;
|
286
|
userInfo.sessionKey = res.data.session_key;
|
287
|
userInfo.sessionKey = res.data.session_key;
|
287
|
userInfo.wechat = app.globalData.userInfo.wechat || '';
|
288
|
userInfo.wechat = app.globalData.userInfo.wechat || '';
|
|
|
289
|
+ console.log('getPhoneNumber => ', userInfo);
|
288
|
|
290
|
|
289
|
app._removeSync('disableAutoLogin');
|
291
|
app._removeSync('disableAutoLogin');
|
290
|
app.setUserInfo(userInfo);
|
292
|
app.setUserInfo(userInfo);
|
|
@@ -331,7 +333,7 @@ function getUserInfo(e) { |
|
@@ -331,7 +333,7 @@ function getUserInfo(e) { |
331
|
});
|
333
|
});
|
332
|
} else {
|
334
|
} else {
|
333
|
console.log(e.detail);
|
335
|
console.log(e.detail);
|
334
|
- let userInfo = Object.assign(app.globalData.userInfo, { wechat: e.detail.userInfo});
|
336
|
+ let userInfo = Object.assign(app.globalData.userInfo || {}, { wechat: e.detail.userInfo});
|
335
|
|
337
|
|
336
|
app.setUserInfo(userInfo);
|
338
|
app.setUserInfo(userInfo);
|
337
|
}
|
339
|
}
|