mirror of
https://github.com/dataease/dataease.git
synced 2026-05-24 06:18:10 +08:00
Merge branch 'dev-v2' into pr@dev-v2_dzz
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user