Authored by huangyi

修复登录bug

... ... @@ -327,7 +327,8 @@ App({
},
isLogin: function () {
return this.globalData.userInfo.uid > 0;
let uid = this.getUid();
return uid > 0;
},
getUid: function () {
... ...
... ... @@ -62,7 +62,6 @@ export const getPhoneNumber = async (e) => {
throw new Error('手机号获取失败,请使用手机号登录');
}
const bindResult = await login.bindMiniAppByAuto(union_id, phoneNumber, countryCode);
console.log(bindResult);
if (bindResult && bindResult.is_register === 0) {
const newUserInfo = {
is_bind: bindResult.is_bind,
... ...
... ... @@ -431,14 +431,14 @@ redirectAction: function() {
let that = this;
if (that.data.h5back) {
wx.navigateBack({
delta: 2,
delta: 1,
})
wx.redirectTo({
url: '../webview/webview?url=' + that.data.h5back
})
} else {
wx.navigateBack({
delta: 2,
delta: 1,
})
return
}
... ...
... ... @@ -492,7 +492,6 @@ Page(Object.assign({
},
loginCallback(params) {
console.log(params);
},
loginSuccess(params) {
... ...