1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

合并仓库前的准备

This commit is contained in:
2022-10-17 13:09:59 +08:00
parent c11080a6f6
commit 04eb563794
29 changed files with 78 additions and 78 deletions

View File

@@ -0,0 +1,24 @@
function isMobile() {
var userAgentInfo = navigator.userAgent;
var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
var mobile_flag = false;
//根据userAgent判断是否是手机
for (var v = 0; v < mobileAgents.length; v++) {
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
mobile_flag = true;
break;
}
}
// var screen_width = window.screen.width;
// var screen_height = window.screen.height;
// //根据屏幕分辨率判断是否是手机
// if (screen_width > 325 && screen_height < 750) {
// mobile_flag = true;
// }
return mobile_flag;
}