判断是在企业微信打开 还是 在浏览器打开

if (this.is_weixin()) {
    this.qixin = true
    this.browser = false
} else {
    this.qixin = false
    this.browser = true
}

 方法:

is_weixin () {
   return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
}
原文地址:https://www.cnblogs.com/candy-Yao/p/9948308.html