From 4d224c115db78700fd106bf96e6825920a703ecd Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Thu, 4 Jul 2024 17:28:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=94=A8=E6=88=B7=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E8=AE=BE=E5=A4=87=E8=B7=B3=E8=BD=AC=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E7=9A=84=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94=E8=A1=A8=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/permission.js b/src/permission.js index f7bc06ad..42a12db4 100644 --- a/src/permission.js +++ b/src/permission.js @@ -55,15 +55,27 @@ router.beforeEach(async(to, from, next) => { } else { /* has no token*/ if (whiteList.indexOf(to.path) !== -1) { - // 在免登录whiteList中,直接进入 - if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') { - OSSclient() + if (to.path === '/researchLogin') { + const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i) + if (flag) { + next(`/researchLogin_m`) + } else { + next() + } + } else { + // 在免登录whiteList中,直接进入 + if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') { + OSSclient() + } + next() } - next() } else { if (to.path === '/researchForm') { next(`/researchLogin?`) NProgress.done() + } else if (to.path === '/researchDetail_m') { + next(`/researchLogin_m?`) + NProgress.done() } else if (to.path === '/ReviewersResearchForm') { next(`/ReviewersResearch?`) NProgress.done()