diff --git a/core/core-frontend/src/utils/utils.ts b/core/core-frontend/src/utils/utils.ts index 778b74fa2c..cc509b1e22 100644 --- a/core/core-frontend/src/utils/utils.ts +++ b/core/core-frontend/src/utils/utils.ts @@ -67,3 +67,16 @@ export const setColorName = (obj, keyword: string, key?: string, colorKey?: stri } obj[colorKey] = null } + +export const getQueryString = (name: string) => { + const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i') + const r = window.location.search.substr(1).match(reg) + if (r != null) { + return unescape(r[2]) + } + return null +} + +export const isLarkPlatform = () => { + return !!getQueryString('state') && !!getQueryString('code') +} diff --git a/core/core-frontend/src/views/login/index.vue b/core/core-frontend/src/views/login/index.vue index 18666d192d..e9d176490d 100644 --- a/core/core-frontend/src/views/login/index.vue +++ b/core/core-frontend/src/views/login/index.vue @@ -16,6 +16,7 @@ import { logoutHandler } from '@/utils/logout' import DeImage from '@/assets/login-desc-de.png' import elementResizeDetectorMaker from 'element-resize-detector' import PreheatImage from '@/assets/preheat.png' +import { isLarkPlatform } from '@/utils/utils' const { wsCache } = useCache() const appStore = useAppStoreWithOut() const userStore = useUserStoreWithOut() @@ -129,7 +130,7 @@ const showLoginImage = computed(() => { const checkPlatform = () => { const flagArray = ['/casbi', 'oidcbi'] const pathname = window.location.pathname - if (!flagArray.some(flag => pathname.includes(flag))) { + if (!flagArray.some(flag => pathname.includes(flag)) && !isLarkPlatform()) { cleanPlatformFlag() } } diff --git a/de-xpack b/de-xpack index 91e4019972..723bb9ff96 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 91e4019972ec96f7f672bb5da2156f54ca9d72ea +Subproject commit 723bb9ff960159769673ac58982f07b18e6aa181