Commit e7bf57bd by 李伟康

提交代码

1 parent 6e729272
......@@ -186,7 +186,7 @@ Component({
} = data,
validTime = 3600 * 24 * 7 * 1e3,
autoLoginFailureTime = Date.now() + validTime
if (autoLogin) {
if (autoLogin && loginUserInfoList[0]) {
wx.$storage.set('auto_login_object', {
failureTime: autoLoginFailureTime,
userName: formData.account,
......
......@@ -21,7 +21,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
......@@ -107,7 +107,7 @@ Page({
code,
message
}) => {
if (code == '0') {
if (code == '0' && data.loginUserInfoList.length) {
const {
sessionId,
loginUserInfoList
......@@ -116,11 +116,12 @@ Page({
} else {
try {
const reload = await loginModal({
message: message || '登录失败请重试',
message: data.loginUserInfoList.length ? message : '登录失败请重试',
cancelText: '返回'
})
if (reload) this.onShow()
} catch (error) {
wx.$storage.rm('auto_login_object')
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!