...
|
...
|
@@ -309,6 +309,26 @@ export const getPhoneNumber = (e) => { |
|
|
title: '手机号授权成功!\r\n为享受更多权益,已为您注册有货会员!',
|
|
|
duration: 3000
|
|
|
});
|
|
|
} else {
|
|
|
const newUserInfo = {
|
|
|
is_bind: result.is_bind,
|
|
|
mobile: result.profile,
|
|
|
session_key: result.session_key,
|
|
|
uid: result.uid,
|
|
|
ssouid: result.ssouid,
|
|
|
union_id: union_id,
|
|
|
vip: result.vip
|
|
|
};
|
|
|
|
|
|
let userInfo = wx.getStorageSync('userInfo');
|
|
|
userInfo = Object.assign(userInfo, newUserInfo);
|
|
|
setStorageWithValueForKey('userInfo', userInfo);
|
|
|
setStorageWithValueForKey('session_key', result.session_key);
|
|
|
globalData.userInfo = userInfo;
|
|
|
event.emit(checkEventName(USER_LOGIN_SUCCESS, fromPage));
|
|
|
setTimeout(() => {
|
|
|
event.emit(MY_USER_LOGIN_SUCCESS);
|
|
|
}, 1000);
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
event.emit(checkEventName(USER_GET_PHONENUMBER_ERROR, fromPage), error.message);
|
...
|
...
|
|