|
@@ -33,11 +33,11 @@ Page({
|
|
|
*/
|
|
|
onShow() {
|
|
|
app.globalData.selectedInex = 0
|
|
|
+ wx.setStorageSync('selectedInex', 0)
|
|
|
this.handleToken()
|
|
|
},
|
|
|
handleToken () {
|
|
|
const accessToken = wx.getStorageSync('accessToken')
|
|
|
- console.log('accessToken',accessToken);
|
|
|
if (accessToken) {
|
|
|
this.storageTokenLogin()
|
|
|
} else {
|
|
@@ -80,6 +80,7 @@ Page({
|
|
|
console.log(_isNeedPhone, _headImg, '79');
|
|
|
if (!_isNeedPhone && _headImg !== '') {
|
|
|
app.globalData.userInfo.login = true
|
|
|
+ wx.setStorageSync('login', true)
|
|
|
this.initIndexData()
|
|
|
} else {
|
|
|
if (_isNeedPhone) {
|
|
@@ -93,6 +94,7 @@ Page({
|
|
|
})
|
|
|
} else {
|
|
|
app.globalData.userInfo.login = true
|
|
|
+ wx.setStorageSync('login', true)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -139,6 +141,7 @@ Page({
|
|
|
})
|
|
|
} else {
|
|
|
app.globalData.userInfo.login = true
|
|
|
+ wx.setStorageSync('login', true)
|
|
|
}
|
|
|
}).catch(e => {
|
|
|
wx.hideLoading()
|
|
@@ -187,6 +190,7 @@ Page({
|
|
|
app.globalData.userInfo.headImg = _headImg
|
|
|
app.globalData.userInfo.userName = _userName
|
|
|
app.globalData.isNeedHeadImg = false
|
|
|
+ wx.setStorageSync('login', true)
|
|
|
wx.setStorageSync('headImg', _headImg)
|
|
|
wx.setStorageSync('userName', _userName)
|
|
|
wx.setStorageSync('isNeedHeadImg', false)
|