diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts index 5b2fbbca88..402bd50e1c 100644 --- a/core/core-frontend/src/permission.ts +++ b/core/core-frontend/src/permission.ts @@ -22,7 +22,7 @@ const { start, done } = useNProgress() const { loadStart, loadDone } = usePageLoading() -const whiteList = ['/login', '/de-link', '/chart-view'] // 不重定向白名单 +const whiteList = ['/login', '/de-link', '/chart-view', '/notSupport'] // 不重定向白名单 const embeddedWindowWhiteList = ['/dvCanvas', '/dashboard', '/preview', '/dataset-embedded-form'] const embeddedRouteWhiteList = ['/dataset-embedded', '/dataset-form', '/dataset-embedded-form'] router.beforeEach(async (to, from, next) => { @@ -34,13 +34,13 @@ router.beforeEach(async (to, from, next) => { await appStore.setAppModel() isDesktop = appStore.getDesktop } - if (isMobile()) { + if (isMobile() && to.path !== '/notSupport') { done() loadDone() if (to.name === 'link') { window.location.href = window.origin + '/mobile.html#' + to.path } else if (to.path === '/dvCanvas') { - window.location.href = window.origin + '/mobile.html#' + to.path + next('/notSupport') } else if ( wsCache.get('user.token') || isDesktop || diff --git a/core/core-frontend/src/permissionMobile.ts b/core/core-frontend/src/permissionMobile.ts index 3e2b3c5943..7affd4ecd0 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) || to.path.includes('/de-link')) { + if (whiteList.includes(to.path) || to.name === 'link') { next() } else { next('/login') // 否则全部重定向到登录页 diff --git a/core/core-frontend/src/router/index.ts b/core/core-frontend/src/router/index.ts index 0428ac6371..006703bae7 100644 --- a/core/core-frontend/src/router/index.ts +++ b/core/core-frontend/src/router/index.ts @@ -20,6 +20,13 @@ export const routes: AppRouteRecordRaw[] = [ } ] }, + { + path: '/notSupport', + name: 'notSupport', + hidden: true, + meta: {}, + component: () => import('@/views/mobile/panel/NotSupport.vue') + }, { path: '/login', name: 'login', diff --git a/core/core-frontend/src/views/visualized/data/dataset/options.js b/core/core-frontend/src/views/visualized/data/dataset/options.js index 7f0cb017e2..34707116fa 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/options.js +++ b/core/core-frontend/src/views/visualized/data/dataset/options.js @@ -26,7 +26,7 @@ const sysParamsIlns = sysParamsEnum.map(_ => { return { value: `\${sysParams.${_}}`, label: `auth.sysParams_type.${toLine(_)}` } }) -const fieldEnums = ['text', 'time', 'value', 'value', , 'location'] +const fieldEnums = ['text', 'time', 'value', 'value', 'value', 'location'] export { textOptions,