修改手机端返回跳到pc的首页
This commit is contained in:
Vendored
+30
-30
@@ -268,36 +268,36 @@
|
||||
</style>
|
||||
<!-- 全局配置 -->
|
||||
<script>
|
||||
// 判断当前设备
|
||||
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 < 500 && screen_height < 800) {
|
||||
mobile_flag = true
|
||||
}
|
||||
return mobile_flag
|
||||
}
|
||||
|
||||
if (isMobile()) {
|
||||
if (location.pathname == '/dashboard/analysis' || location.pathname == '/') {
|
||||
window.location.href = 'http://10.10.10.46:8102/phoneSearch'
|
||||
}
|
||||
}
|
||||
// // 判断当前设备
|
||||
// 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 < 500 && screen_height < 800) {
|
||||
// mobile_flag = true
|
||||
// }
|
||||
// return mobile_flag
|
||||
// }
|
||||
//
|
||||
// if (isMobile()) {
|
||||
// if (location.pathname == '/dashboard/analysis' || location.pathname == '/') {
|
||||
// window.location.href = 'http://10.10.10.46:8102/phoneSearch'
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user