识别设备型号
let appList = ["MeeGo", "Android", "iPad", "iPhone"]//常见的手机型号标识
//判断用户信息里面是否包含app
let userAgent = window.navigator.userAgent;
function isApp() {
//思维方式 学习习惯
for (let i = 0; i < appList.length; i++) {
let item = appList[i];
if (userAgent.indexOf(item) != -1) {
return true;
}
}
return false;
}