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

This commit is contained in:
super_liu
2022-06-08 16:20:57 +08:00
parent 28dd02f406
commit 9b63fdc306
6 changed files with 24134 additions and 6887 deletions
+11 -2
View File
@@ -65,6 +65,7 @@ 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){
@@ -72,7 +73,8 @@ router.beforeEach(function (to, from, next) {
}
let toName = to.name
if (toName === 'CheckPage' || toName === 'loginStandDetails' || toName === 'error') {
if (toName === 'CheckPage' || toName === 'loginStandDetails' || toName === 'error'
|| toName === 'LoginVerifyPhone') {
next()
return
}
@@ -145,7 +147,13 @@ router.beforeEach(function (to, from, next) {
// 单点登录
/** 判断是不是在手机端操作 */
if (isMobile()) {
if(toName === 'processCenter'){
if(toName === 'phoneHome'){
if((token === null || token === '' ) && toName !== 'Login'){
next('/loginVerifyPhone')
}else {
next()
}
}else if(toName === 'processCenter'){
// hwh5.close();
//关闭当前窗口
let userAgent = navigator.userAgent;
@@ -161,6 +169,7 @@ router.beforeEach(function (to, from, next) {
//如果是微信打开,关闭当前微信窗口
weixinClosePage()
}else {
if ((token === null || token === '' ) && toName !== 'Login') {
if(toName !== 'phoneIndex'){
localStorage.removeItem("param");