u
This commit is contained in:
1 parent
68f08d921a
commit
3656d05f62
97 files changed
+17495
No files matched your search
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* @Author: 菲鸽
|
||||
* @Date: 2024-03-28 19:13:55
|
||||
* @Last Modified by: 菲鸽
|
||||
* @Last Modified time: 2024-03-28 19:24:55
|
||||
*/
|
||||
export const platform = __UNI_PLATFORM__
|
||||
export const isH5 = __UNI_PLATFORM__ === 'h5'
|
||||
export const isApp = __UNI_PLATFORM__ === 'app'
|
||||
export const isMp = __UNI_PLATFORM__.startsWith('mp-')
|
||||
export const isMpWeixin = __UNI_PLATFORM__.startsWith('mp-weixin')
|
||||
export const isMpAplipay = __UNI_PLATFORM__.startsWith('mp-alipay')
|
||||
export const isMpToutiao = __UNI_PLATFORM__.startsWith('mp-toutiao')
|
||||
export const isHarmony = __UNI_PLATFORM__.startsWith('app-harmony')
|
||||
|
||||
const PLATFORM = {
|
||||
platform,
|
||||
isH5,
|
||||
isApp,
|
||||
isMp,
|
||||
isMpWeixin,
|
||||
isMpAplipay,
|
||||
isMpToutiao,
|
||||
isHarmony,
|
||||
}
|
||||
export default PLATFORM
|
||||
Reference in new issue
Block a user