feat: There is no way the, weblink 免登陆

This commit is contained in:
super_liu
2022-06-08 17:57:32 +08:00
parent 3caaa0fa93
commit 51ff37ebb4
4 changed files with 102 additions and 23 deletions
+12 -9
View File
@@ -65,7 +65,6 @@ import VConsole from 'vuex'
import isMobile from "./store/isMobile";
// 路由拦截
router.beforeEach(function (to, from, next) {
debugger
let fromName = from.name
if(fromName === undefined || fromName === null){
@@ -148,11 +147,7 @@ debugger
/** 判断是不是在手机端操作 */
if (isMobile()) {
if(toName === 'phoneHome'){
if((token === null || token === '' ) && toName !== 'Login'){
next('/loginVerifyPhone')
}else {
next()
}
next('/loginVerifyPhone')
}else if(toName === 'processCenter'){
// hwh5.close();
//关闭当前窗口
@@ -172,9 +167,17 @@ debugger
if ((token === null || token === '' ) && toName !== 'Login') {
if(toName !== 'phoneIndex'){
localStorage.removeItem("param");
localStorage.setItem('param',JSON.stringify(param4))
next('/phoneIndex')
if(toName === 'phoneHome'){
next('/loginVerifyPhone')
}else {
if(fromName === 'phoneHome'){
next()
}else {
localStorage.removeItem("param");
localStorage.setItem('param',JSON.stringify(param4))
next('/phoneIndex')
}
}
}else {
next()
}