mozilla/5.0 (iphone; cpu iphone os 11_0 like mac os x) applewebkit/604.1.38 (khtml, like gecko) version/11.0 mobile/15a372 safari/604.1 wechatdevtools/1.06.2304272 micromessenger/8.0.5 language/zh_cn webview/100_94 webdebugger miniprogramhtmlwebview miniprogram port/45127
参考https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81-2:~:text=%E5%9C%A8%E7%BD%91%E9%A1%B5%E5%86%85,%E5%B0%8F%E7%A8%8B%E5%BA%8F%E7%8E%AF%E5%A2%83
mozilla/5.0 (iphone; cpu iphone os 11_0 like mac os x) applewebkit/604.1.38 (khtml, like gecko) version/11.0 mobile/15a372 safari/604.1 wechatdevtools/1.06.2304272 micromessenger/8.0.5 language/zh_cn webview/100_94 webdebugger miniprogramhtmlwebview miniprogram port/45127
// 真机测试 var ua = navigator.userAgent.toLowerCase(); ua.match(/wxwork/i) == ‘wxwork’ // 结果为true或者false /wxwork/i.test(navigator.userAgent); // 结果为true或者false