// #ifdef H5
var ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
console.log("这是微信浏览器")
}else{
console.log("这是普通浏览器")
}
// #endif
标签:浏览器,log,微信,app,console,uni
From: https://www.cnblogs.com/vant-xie/p/16665361.html