function judge() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone",
"SymbianOS", "Windows Phone",
"iPad", "iPod"
]; // 判断是否是这几个系统
var isPC = true;
for (let i = 0; i < Agents.length; i++) {
if (userAgentInfo.indexOf(Agents[i]) > 0) {
isPC = false;
break;
}
}
return isPC;
}
var isPC = judge();
if(isPC){
// pc 端
}else {
window.location.href = '' //跳转到手机端首页面
}