From 3985adb18d1113faf05da4ef8240ea4473ef33f8 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 12 Sep 2024 15:38:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20preview?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=93=BE=E6=8E=A5=E8=AE=BF=E9=97=AE=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/permission.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts index d10056832d..2c52b85605 100644 --- a/core/core-frontend/src/permission.ts +++ b/core/core-frontend/src/permission.ts @@ -28,7 +28,7 @@ const embeddedRouteWhiteList = ['/dataset-embedded', '/dataset-form', '/dataset- router.beforeEach(async (to, from, next) => { start() loadStart() - checkPlatform() + const platform = checkPlatform() let isDesktop = wsCache.get('app.desktop') if (isDesktop === null) { await appStore.setAppModel() @@ -130,7 +130,7 @@ router.beforeEach(async (to, from, next) => { permissionStore.setCurrentPath(to.path) next() } else if ( - embeddedWindowWhiteList.includes(to.path) || + (!platform && embeddedWindowWhiteList.includes(to.path)) || whiteList.includes(to.path) || to.path.startsWith('/de-link/') ) { @@ -138,7 +138,7 @@ router.beforeEach(async (to, from, next) => { permissionStore.setCurrentPath(to.path) next() } else { - next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 + next(`/login?redirect=${to.fullPath || to.path}`) // 否则全部重定向到登录页 } } })