fix: 修改部分内容,支持鸿蒙系统浏览器。

This commit is contained in:
tianyongbao
2024-10-01 10:13:05 +08:00
parent b3890369e6
commit f4ba85cd5b
5 changed files with 109 additions and 28 deletions

View File

@@ -16,6 +16,8 @@ export default class Util {
mobile: !!userAgent.match(/AppleWebKit.*Mobile.*/), // 是否为移动终端
iPad: userAgent.indexOf('iPad') > -1, // 是否iPad
webApp: userAgent.indexOf('Safari') === -1, // 是否web应该程序没有头部与底部
wechat: userAgent.indexOf('MicroMessenger') > -1
wechat: userAgent.indexOf('MicroMessenger') > -1, // 是否微信浏览器
isapp: window.innerWidth < 768, // 是否微信浏览器
harmonyOS: userAgent.indexOf('HarmonyOS') > -1,
}
}