/*
* @func isWeiXin
* @explain 判断是否微信浏览器
*/
export function isWeiXin() {
let ua = window.navigator.userAgent;
if (ua.match(/MicroMessenger/i) == 'MicroMessenger') {
return true;
}
else {
return false;
}
}
// 判断移动端设备
function deviceType(){
var ua = navigator.userAgent;
var agent = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
for(var i=0; i<len,len = agent.length; i++){
if(ua.indexOf(agent[i])>0){
break;
}
}
}
deviceType();
window.addEventListener('resize', function(){
deviceType();
})