const ua = navigator.userAgent.toLowerCase();
const isMobile = () => {
let agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPod", "iPad"];
for(let i = 0; i < agents.length; i++){
if(ua.indexOf(agents[i].toLowerCase()) >= 0) return true;
}
return false;
}
const isWeixin = () => {
return Boolean(ua.match(/micromessenger/i))
}
const isQQ = () => {
return Boolean(ua.match(/qqbrowser/i))
}
if (isMobile() && (isWeixin() || isQQ())) {
document.querySelector('.share-mask').style.display = 'block'
} else {
console.log('去登录');
}