From 30400120bf0597078f81486c2a0d93464df4f2f6 Mon Sep 17 00:00:00 2001 From: super_liu <396572590@qq.com> Date: Wed, 22 Dec 2021 16:48:46 +0800 Subject: [PATCH] feat: There is no way the,iphone config --- src/main.js | 53 ++++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/src/main.js b/src/main.js index e05c9b850..de2afbb39 100644 --- a/src/main.js +++ b/src/main.js @@ -106,38 +106,41 @@ router.beforeEach(function (to, from, next) { } // 返回值为登录状态 /** 判断是不是在手机端操作 */ + debugger if (isMobile()) { if(toName === 'processCenter'){ - window.close(); - } - if ((token === null || token === '' ) && toName !== 'Login') { - if(toName !== 'phoneIndex'){ - sessionStorage.removeItem("param"); - sessionStorage.setItem('param',JSON.stringify(param4)) - next('/phoneIndex') - }else { - next() - } - } else { - if (toName.slice(0,5) !== 'phone') { + window.opener = null; + window.open("about:blank", "_self").close() + }else { + if ((token === null || token === '' ) && toName !== 'Login') { + if(toName !== 'phoneIndex'){ + sessionStorage.removeItem("param"); + sessionStorage.setItem('param',JSON.stringify(param4)) + next('/phoneIndex') + }else { + next() + } + } else { + if (toName.slice(0,5) !== 'phone') { if(toName === 'LoginVerify'){ - next('/blankPage') - }else { - if(toName === 'blankPage' || toName === 'processedPage') { - next() - }else { - extractedVerify() - } - } - }else { - if(toName !== 'blankPage'){ - if(to.matched.length === 0){ next('/blankPage') + }else { + if(toName === 'blankPage' || toName === 'processedPage') { + next() + }else { + extractedVerify() + } + } + }else { + if(toName !== 'blankPage'){ + if(to.matched.length === 0){ + next('/blankPage') + }else { + next() + } }else { next() } - }else { - next() } } }