|
@@ -18,7 +18,7 @@ Page({
|
|
},
|
|
},
|
|
setTokenExpireTime () {
|
|
setTokenExpireTime () {
|
|
const tokenExpireTime = wx.getStorageSync('tokenExpireTime')
|
|
const tokenExpireTime = wx.getStorageSync('tokenExpireTime')
|
|
- if (util.getDate() !== tokenExpireTime) {
|
|
|
|
|
|
+ if (tokenExpireTime !== '' && util.getDate() !== tokenExpireTime) {
|
|
wx.clearStorageSync()
|
|
wx.clearStorageSync()
|
|
}
|
|
}
|
|
this.handleLogin()
|
|
this.handleLogin()
|
|
@@ -26,7 +26,13 @@ Page({
|
|
handleLogin () {
|
|
handleLogin () {
|
|
const accessToken = wx.getStorageSync('accessToken')
|
|
const accessToken = wx.getStorageSync('accessToken')
|
|
if (accessToken) {
|
|
if (accessToken) {
|
|
- this.handleTokenLogin()
|
|
|
|
|
|
+ const workerLoginCode = wx.getStorageSync('workerLoginCode')
|
|
|
|
+ if (workerLoginCode == '403') {
|
|
|
|
+ wx.clearStorageSync()
|
|
|
|
+ this.handleWXLogin()
|
|
|
|
+ } else {
|
|
|
|
+ this.handleTokenLogin()
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.handleWXLogin()
|
|
this.handleWXLogin()
|
|
}
|
|
}
|
|
@@ -37,6 +43,7 @@ Page({
|
|
},
|
|
},
|
|
handleWXLogin () {
|
|
handleWXLogin () {
|
|
const workerLoginCode = wx.getStorageSync('workerLoginCode')
|
|
const workerLoginCode = wx.getStorageSync('workerLoginCode')
|
|
|
|
+ console.log(workerLoginCode, 'workerLoginCode', wx.getStorageSync('workerLoginCode'));
|
|
if (workerLoginCode == '403') {
|
|
if (workerLoginCode == '403') {
|
|
this.handleCode403()
|
|
this.handleCode403()
|
|
} else {
|
|
} else {
|