perf: 飞书扫码登录样式优化

This commit is contained in:
fit2cloud-chenyw 2023-11-23 13:28:24 +08:00
parent 9e75cacd6d
commit db62421454
3 changed files with 16 additions and 2 deletions

View File

@ -67,3 +67,16 @@ export const setColorName = (obj, keyword: string, key?: string, colorKey?: stri
} }
obj[colorKey] = null 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')
}

View File

@ -16,6 +16,7 @@ import { logoutHandler } from '@/utils/logout'
import DeImage from '@/assets/login-desc-de.png' import DeImage from '@/assets/login-desc-de.png'
import elementResizeDetectorMaker from 'element-resize-detector' import elementResizeDetectorMaker from 'element-resize-detector'
import PreheatImage from '@/assets/preheat.png' import PreheatImage from '@/assets/preheat.png'
import { isLarkPlatform } from '@/utils/utils'
const { wsCache } = useCache() const { wsCache } = useCache()
const appStore = useAppStoreWithOut() const appStore = useAppStoreWithOut()
const userStore = useUserStoreWithOut() const userStore = useUserStoreWithOut()
@ -129,7 +130,7 @@ const showLoginImage = computed<boolean>(() => {
const checkPlatform = () => { const checkPlatform = () => {
const flagArray = ['/casbi', 'oidcbi'] const flagArray = ['/casbi', 'oidcbi']
const pathname = window.location.pathname const pathname = window.location.pathname
if (!flagArray.some(flag => pathname.includes(flag))) { if (!flagArray.some(flag => pathname.includes(flag)) && !isLarkPlatform()) {
cleanPlatformFlag() cleanPlatformFlag()
} }
} }

@ -1 +1 @@
Subproject commit 91e4019972ec96f7f672bb5da2156f54ca9d72ea Subproject commit 723bb9ff960159769673ac58982f07b18e6aa181