Authored by htoooth

fix unionType

... ... @@ -98,8 +98,8 @@ App({
data: ''
});
this.setUserInfo({});
this.setSessionKey('');
this.setUserInfo({});
this.doLogin();
});
... ... @@ -320,8 +320,8 @@ App({
if (!this.globalData.userInfo.uid || !this.globalData.sessionKey) {
return wechatAuthLogin().then(res => {
if (res.code === 10003) { // 微信号已绑定手机号
this.setUserInfo(res.data);
this.setSessionKey(res.data.sessionKey);
this.setUserInfo(res.data);
event.emit('user-login-success');
}
... ... @@ -345,8 +345,8 @@ App({
}
}).then(res => {
if (res.code === 10003) { // 微信号已绑定手机号
this.setUserInfo(res.data);
this.setSessionKey(res.data.sessionKey);
this.setUserInfo(res.data);
event.emit('user-login-success');
}
... ... @@ -359,8 +359,8 @@ App({
});
},
clearUserSession: function() {
this.setUserInfo({});
this.setSessionKey('');
this.setUserInfo({});
this.setUnionID('');
},
getReportUid() {
... ...
... ... @@ -111,8 +111,8 @@ function wechatUserIsBind(unionID, nickName) {
console.log('wechatUserIsBind=>', userInfo);
app._removeSync('disableAutoLogin');
app.setUserInfo(userInfo);
app.setSessionKey(userInfo.sessionKey);
app.setUserInfo(userInfo);
// 登录成功回调
event.emit('yas-login-type-report', {LOGIN_TYPE: 4});
... ... @@ -289,8 +289,8 @@ function getPhoneNumber(e) {
console.log('getPhoneNumber => ', userInfo);
app._removeSync('disableAutoLogin');
app.setUserInfo(userInfo);
app.setSessionKey(userInfo.sessionKey);
app.setUserInfo(userInfo);
if (e.currentTarget && !e.currentTarget.dataset.notJump) {
wx.navigateBack(); // 先执行这个,然后在执行event
... ...
... ... @@ -191,8 +191,8 @@ Page({
userInfo.sessionKey = res.data.session_key;
userInfo.wechat = app.globalData.userInfo.wechat;
app.setUserInfo(userInfo);
app.setSessionKey(userInfo.sessionKey);
app.setUserInfo(userInfo);
event.emit('login-type-report', {LOGIN_TYPE: 5});
event.emit('user-login-success');
... ...