From 2b3715f1610b4176d7abe33e34542389cef61853 Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期六, 12 四月 2025 17:12:22 +0800 Subject: [PATCH] Merge branch 'main' of http://lanpucloud.cn:1111/r/eims-master --- eims-ui-mobile/src/utils/platform.ts | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/eims-ui-mobile/src/utils/platform.ts b/eims-ui-mobile/src/utils/platform.ts new file mode 100644 index 0000000..c714199 --- /dev/null +++ b/eims-ui-mobile/src/utils/platform.ts @@ -0,0 +1,24 @@ +/* + * @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') + +const PLATFORM = { + platform, + isH5, + isApp, + isMp, + isMpWeixin, + isMpAplipay, + isMpToutiao, +} +export default PLATFORM -- Gitblit v1.9.3