Commit e7bf57bd by 李伟康

提交代码

1 parent 6e729272
...@@ -186,7 +186,7 @@ Component({ ...@@ -186,7 +186,7 @@ Component({
} = data, } = data,
validTime = 3600 * 24 * 7 * 1e3, validTime = 3600 * 24 * 7 * 1e3,
autoLoginFailureTime = Date.now() + validTime autoLoginFailureTime = Date.now() + validTime
if (autoLogin) { if (autoLogin && loginUserInfoList[0]) {
wx.$storage.set('auto_login_object', { wx.$storage.set('auto_login_object', {
failureTime: autoLoginFailureTime, failureTime: autoLoginFailureTime,
userName: formData.account, userName: formData.account,
......
...@@ -21,7 +21,7 @@ Page({ ...@@ -21,7 +21,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
}, },
/** /**
...@@ -107,7 +107,7 @@ Page({ ...@@ -107,7 +107,7 @@ Page({
code, code,
message message
}) => { }) => {
if (code == '0') { if (code == '0' && data.loginUserInfoList.length) {
const { const {
sessionId, sessionId,
loginUserInfoList loginUserInfoList
...@@ -116,11 +116,12 @@ Page({ ...@@ -116,11 +116,12 @@ Page({
} else { } else {
try { try {
const reload = await loginModal({ const reload = await loginModal({
message: message || '登录失败请重试', message: data.loginUserInfoList.length ? message : '登录失败请重试',
cancelText: '返回' cancelText: '返回'
}) })
if (reload) this.onShow() if (reload) this.onShow()
} catch (error) { } catch (error) {
wx.$storage.rm('auto_login_object')
wx.$router.reLaunch('login.index', obj) wx.$router.reLaunch('login.index', obj)
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!