|
|
|
@ -180,9 +180,9 @@ Page({ |
|
|
|
url: '../login/login' |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
wx.switchTab({ |
|
|
|
url: '../jz/jz' |
|
|
|
}) |
|
|
|
wx.navigateBack({ |
|
|
|
delta: 1 |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad: function () { |
|
|
|
@ -206,6 +206,7 @@ Page({ |
|
|
|
dataType: 'json', |
|
|
|
responseType: 'text', |
|
|
|
success: function (res) { |
|
|
|
console.log(res) |
|
|
|
var data = res.data; |
|
|
|
var status = data.code; |
|
|
|
if (status != 0) { |
|
|
|
@ -235,7 +236,6 @@ Page({ |
|
|
|
userInfo: app.globalData.userInfo, |
|
|
|
hasUserInfo: true |
|
|
|
}) |
|
|
|
console.log(app.globalData.userInfo); |
|
|
|
} else if (this.data.canIUse) { |
|
|
|
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
|
|
|
|
// 所以此处加入 callback 以防止这种情况
|
|
|
|
|