判断是否来自微信内置浏览器还是不是来自微信内置浏览器
function isWeiXin() { var ua = window.navigator.userAgent.toLowerCase(); // console.log(ua);//mozilla/5.0 (iphone; cpu iphone os 9_1 like mac os x) applewebkit/601.1.46 (khtml, like gecko)version/9.0 mobile/13b143 safari/601.1 if (ua.match(/MicroMessenger/i) == 'micromessenger') { return true; } else { return false; } } if(isWeiXin()){ that.Trigger = '是来自微信内置浏览' } else{ that.PorjectOut = true that.Trigger = '不是来自微信内置浏览器' // console.log("不是来自微信内置浏览器");}