diff --git a/core/core-frontend/src/assets/logo-bg.jpg b/core/core-frontend/src/assets/logo-bg.jpg
new file mode 100644
index 0000000000..a6de785104
Binary files /dev/null and b/core/core-frontend/src/assets/logo-bg.jpg differ
diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts
index 550d8bf2a1..935ad158b2 100644
--- a/core/core-frontend/src/permission.ts
+++ b/core/core-frontend/src/permission.ts
@@ -7,6 +7,7 @@ import { usePermissionStoreWithOut, pathValid, getFirstAuthMenu } from '@/store/
import { usePageLoading } from '@/hooks/web/usePageLoading'
import { getRoleRouters } from '@/api/common'
import { useCache } from '@/hooks/web/useCache'
+import { isMobile } from '@/utils/utils'
import { interactiveStoreWithOut } from '@/store/modules/interactive'
const { wsCache } = useCache()
const permissionStore = usePermissionStoreWithOut()
@@ -23,6 +24,12 @@ const whiteList = ['/login', '/de-link'] // 不重定向白名单
router.beforeEach(async (to, from, next) => {
start()
loadStart()
+
+ if (isMobile()) {
+ done()
+ loadDone()
+ window.location.href = window.origin + '/mobile.html#/index'
+ }
let isDesktop = wsCache.get('app.desktop')
if (isDesktop === null) {
await appStore.setAppModel()
diff --git a/core/core-frontend/src/permissionMobile.ts b/core/core-frontend/src/permissionMobile.ts
index 79a5d90835..ffe285a70e 100644
--- a/core/core-frontend/src/permissionMobile.ts
+++ b/core/core-frontend/src/permissionMobile.ts
@@ -14,6 +14,7 @@ const { start, done } = useNProgress()
const interactiveStore = interactiveStoreWithOut()
const { loadStart, loadDone } = usePageLoading()
+const whiteList = ['/login'] // 不重定向白名单
router.beforeEach(async (to, _, next) => {
start()
@@ -34,7 +35,11 @@ router.beforeEach(async (to, _, next) => {
next()
}
} else {
- next('/login') // 否则全部重定向到登录页
+ if (whiteList.includes(to.path)) {
+ next()
+ } else {
+ next('/login') // 否则全部重定向到登录页
+ }
}
})
diff --git a/core/core-frontend/src/utils/utils.ts b/core/core-frontend/src/utils/utils.ts
index cc509b1e22..b86eb68d4b 100644
--- a/core/core-frontend/src/utils/utils.ts
+++ b/core/core-frontend/src/utils/utils.ts
@@ -80,3 +80,9 @@ export const getQueryString = (name: string) => {
export const isLarkPlatform = () => {
return !!getQueryString('state') && !!getQueryString('code')
}
+
+export function isMobile() {
+ return navigator.userAgent.match(
+ /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
+ )
+}
diff --git a/core/core-frontend/src/views/mobile/directory/index.vue b/core/core-frontend/src/views/mobile/directory/index.vue
index 406bcf4204..a1404efdba 100644
--- a/core/core-frontend/src/views/mobile/directory/index.vue
+++ b/core/core-frontend/src/views/mobile/directory/index.vue
@@ -1,5 +1,5 @@
-
+
+
+
用户登录
+
+
+
+
+
+
+ 提交
+
+
+
+
-
+
diff --git a/core/core-frontend/src/views/mobile/panel/index.vue b/core/core-frontend/src/views/mobile/panel/index.vue
index 594d6a6a46..39e0313554 100644
--- a/core/core-frontend/src/views/mobile/panel/index.vue
+++ b/core/core-frontend/src/views/mobile/panel/index.vue
@@ -3,9 +3,9 @@ import { onBeforeMount, ref, onBeforeUnmount } from 'vue'
import { useEmitt } from '@/hooks/web/useEmitt'
import eventBus from '@/utils/eventBus'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
-const dvMainStore = dvMainStoreWithOut()
import DePreviewMobile from './MobileInPc.vue'
const panelInit = ref(false)
+const dvMainStore = dvMainStoreWithOut()
const checkItemPosition = component => {
component.x = 1