46 lines
1.4 KiB
HTML
46 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Title</title>
|
|
<!--02.js-jquery-->
|
|
<script src="plugs/jquery/jquery-1.12.3.min.js"></script>
|
|
<script src="plugs/json2.min.js"></script>
|
|
<script src="js/comm/commHelper.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<script>
|
|
$(function () {
|
|
if (isMobile()) {
|
|
window.location.href = "admin/mobile/login/nmlogin.html";
|
|
} else {
|
|
window.location.href = "admin/filling/login.html";
|
|
}
|
|
});
|
|
|
|
|
|
function isMobile() {
|
|
var mobile_flag = false;
|
|
if (commHelper.isOpenMobile) {
|
|
var userAgentInfo = navigator.userAgent;
|
|
var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
|
|
//根据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 < 500 && screen_height < 800) {
|
|
mobile_flag = true;
|
|
}
|
|
}
|
|
return mobile_flag;
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |