Files
pj_h5_cloud/src/sheep/utils/getAppInfo.ts
T
2025-04-16 20:34:46 +08:00

16 lines
307 B
TypeScript

// 检测app信息判断运行环境
export const getAppInfo = async (): Promise<string> => {
try {
const res = await (window as any).CP2.getAppInfo()
// 浙政钉环境
if (res.code === 0) {
return "zzd"
} else {
// 诗画环境
return "sh"
}
} catch (error) {
return "unknown"
}
}