diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts index c514b93ac5..fbc17be658 100644 --- a/core/core-frontend/src/permission.ts +++ b/core/core-frontend/src/permission.ts @@ -27,11 +27,14 @@ const whiteList = ['/login', '/de-link', '/chart-view'] // 不重定向白名单 router.beforeEach(async (to, from, next) => { start() loadStart() - - if (isMobile() && to.name !== 'link') { + if (isMobile()) { done() loadDone() - window.location.href = window.origin + '/mobile.html#/index' + if (to.name === 'link') { + window.location.href = window.origin + '/mobile.html#' + to.path + } else { + window.location.href = window.origin + '/mobile.html#/index' + } } let isDesktop = wsCache.get('app.desktop') if (isDesktop === null) { diff --git a/core/core-frontend/src/permissionMobile.ts b/core/core-frontend/src/permissionMobile.ts index 23c3b718f6..eae649f924 100644 --- a/core/core-frontend/src/permissionMobile.ts +++ b/core/core-frontend/src/permissionMobile.ts @@ -39,7 +39,7 @@ router.beforeEach(async (to, _, next) => { next() } } else { - if (whiteList.includes(to.path)) { + if (whiteList.includes(to.path) || to.path.includes('/de-link')) { next() } else { next('/login') // 否则全部重定向到登录页 diff --git a/core/core-frontend/src/router/mobile.ts b/core/core-frontend/src/router/mobile.ts index 29ded300f0..7d2e5981a1 100644 --- a/core/core-frontend/src/router/mobile.ts +++ b/core/core-frontend/src/router/mobile.ts @@ -31,6 +31,13 @@ export const routes: AppRouteRecordRaw[] = [ meta: {}, component: () => import('@/views/mobile/panel/index.vue') }, + { + path: '/de-link/:uuid', + name: 'link', + hidden: true, + meta: {}, + component: () => import('@/views/share/link/mobile.vue') + }, { path: '/panel/mobile', name: 'mobile', diff --git a/core/core-frontend/src/views/share/link/mobile.vue b/core/core-frontend/src/views/share/link/mobile.vue new file mode 100644 index 0000000000..7a95efecd1 --- /dev/null +++ b/core/core-frontend/src/views/share/link/mobile.vue @@ -0,0 +1,92 @@ + + +