From 6be8cf3cacd457b5814d13443bc9a57ac86e6f8d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 31 May 2024 16:32:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(X-Pack):=20=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E4=BD=BF=E7=94=A8=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E5=85=8D=E7=99=BB=E8=BF=9B=E5=85=A5pc=E7=89=88=E9=A6=96?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/permission.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts index cc00868bab..5cf6757e0c 100644 --- a/core/core-frontend/src/permission.ts +++ b/core/core-frontend/src/permission.ts @@ -29,20 +29,24 @@ router.beforeEach(async (to, from, next) => { start() loadStart() checkPlatform() + let isDesktop = wsCache.get('app.desktop') + if (isDesktop === null) { + await appStore.setAppModel() + isDesktop = appStore.getDesktop + } if (isMobile()) { done() loadDone() if (to.name === 'link') { window.location.href = window.origin + '/mobile.html#' + to.path - } else if (!isPlatformClient() && !isLarkPlatform()) { + } else if ( + wsCache.get('user.token') || + isDesktop || + (!isPlatformClient() && !isLarkPlatform()) + ) { window.location.href = window.origin + '/mobile.html#/index' } } - let isDesktop = wsCache.get('app.desktop') - if (isDesktop === null) { - await appStore.setAppModel() - isDesktop = appStore.getDesktop - } await appearanceStore.setAppearance() if (wsCache.get('user.token') || isDesktop) { if (!userStore.getUid) {