Merge branch 'dev-v2' into pr@dev-v2_dzz

This commit is contained in:
dataeaseShu
2023-11-23 17:05:50 +08:00
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
}
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')
}