Browse Source

增加鸿蒙设备判断

ellisran 4 days ago
parent
commit
1f62c20b58
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/extend/helper.js

+ 1 - 1
app/extend/helper.js

@@ -1289,7 +1289,7 @@ module.exports = {
     isMobile(agent) {
         const ua = new UAParser(agent);
         const osInfo = ua.getOS();
-        return (agent ? agent.match(/(iphone|ipod|android)/i) : false) || osInfo.name === 'Android' || osInfo.name === 'iOS';
+        return (agent ? agent.match(/(iphone|ipod|android|Harmony)/i) : false) || osInfo.name === 'Android' || osInfo.name === 'iOS' || osInfo.name === 'HarmonyOS';
     },
 
     /**