/*判断浏览器
1:企业微信
2:微信
3:其他浏览器
*/
export function isWeixn() {
const ua = navigator.userAgent.toLowerCase();
const isWeixin = ua.indexOf('micromessenger') != -1;
const isQYWeixin = ua.indexOf('wxwork') != -1;
if (isQYWeixin && isWeixin) {
return 1;
} else if (isWeixin && !isQYWeixin) {
return 2;
} else {
return 3;
}
}
封装判断浏览器方法
最新推荐文章于 2023-07-31 16:18:54 发布