|
|
@@ -234,14 +234,6 @@ |
|
|
|
// this.SET_STORAGE('userinfo', loginResult.baseinfo); |
|
|
|
this.username = "" |
|
|
|
this.password = "" |
|
|
|
if (loginResult.pwd === true) { |
|
|
|
this.SET_STORAGE('pwd', true); |
|
|
|
this.TOAST("登录失败!您的密码不满足强度要求,请您先修改密码后再执行系统其他操作"); |
|
|
|
location.href = "http://" + window.location.host + "/#/pages/my/newpassword"; |
|
|
|
return; |
|
|
|
} else { |
|
|
|
this.SET_STORAGE('pwd', false); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.TOAST(postResult[1].data.info); |
|
|
@@ -345,19 +337,21 @@ |
|
|
|
mobile: this.mobile, |
|
|
|
verifycode: this.verifycode |
|
|
|
}) |
|
|
|
// if (!codeResult || !codeResult[1] || !codeResult[1].data) { |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if (!codeResult[1].data.code || codeResult[1].data.code != 200) { |
|
|
|
// this.TOAST(codeResult[1].data.info); |
|
|
|
// return |
|
|
|
// } |
|
|
|
if (!codeResult || !codeResult[1] || !codeResult[1].data) { |
|
|
|
return |
|
|
|
} |
|
|
|
if (!codeResult[1].data.code || codeResult[1].data.code != 200) { |
|
|
|
this.TOAST(codeResult[1].data.info); |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.loginResult.baseinfo.Description == '学生') { |
|
|
|
this.SET_STORAGE("tokenExpireTime", new Date().valueOf()+86400000*30) |
|
|
|
}else{ |
|
|
|
this.SET_STORAGE("tokenExpireTime", new Date().valueOf()+86400000*7) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.SET_GLOBAL('token', this.resData.token) |
|
|
|
this.SET_GLOBAL('loginUser', this.resData.user) |
|
|
@@ -365,8 +359,21 @@ |
|
|
|
this.SET_STORAGE('token', this.resData.token) |
|
|
|
this.SET_STORAGE('logininfo', this.logininfo); |
|
|
|
this.SET_STORAGE('userinfo', this.loginResult.baseinfo); |
|
|
|
this.TAB_TO('/pages/home') |
|
|
|
this.HIDE_LOADING() |
|
|
|
|
|
|
|
if (this.loginResult.pwd === true) { |
|
|
|
this.SET_STORAGE('pwd', true); |
|
|
|
this.TOAST("您的密码不满足强度要求,请您先修改密码后再执行系统其他操作"); |
|
|
|
setTimeout(()=>{ |
|
|
|
this.NAV_TO('/pages/my/newpassword') |
|
|
|
},1000) |
|
|
|
return; |
|
|
|
} else { |
|
|
|
this.SET_STORAGE('pwd', false); |
|
|
|
this.TAB_TO('/pages/home') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
toLogin() { |
|
|
|
this.resData = {} |
|
|
|