feat: There is no way the,  不支持手机操作 跳入phoneHome 固定逻辑操作

This commit is contained in:
396572590@qq.com
2022-08-10 16:52:26 +08:00
parent f4a1bdfdf2
commit 4b21a453dd
+20 -2
View File
@@ -212,7 +212,16 @@ router.beforeEach(function (to, from, next) {
next()
}else if (toName.slice(0,5) !== 'phone') {
if(toName === 'LoginVerify'){
next('/blankPage')
if(toName === 'phoneHome'){
// 手机端 首页 首次进入系统 清除 缓存, 防止 跳转 oa 的页面, 问题追溯 #55852
localStorage.removeItem('token')
token = localStorage.getItem("token")
window.sessionStorage.clear()
localStorage.setItem("routerName","phoneHome")
next('/loginVerifyPhone')
}else{
next('/blankPage')
}
}else {
if(toName === 'blankPage' || toName === 'processedPage') {
next()
@@ -223,7 +232,16 @@ router.beforeEach(function (to, from, next) {
}else {
if(toName !== 'blankPage'){
if(to.matched.length === 0){
next('/blankPage')
if(toName === 'phoneHome'){
// 手机端 首页 首次进入系统 清除 缓存, 防止 跳转 oa 的页面, 问题追溯 #55852
localStorage.removeItem('token')
token = localStorage.getItem("token")
window.sessionStorage.clear()
localStorage.setItem("routerName","phoneHome")
next('/loginVerifyPhone')
}else{
next('/blankPage')
}
}else {
next()
}