var SYS_isWap=1; var SYS_isPcToWap=2; var SYS_isAppWap=1; var SYS_appWapUrl="http:\/\/m.hbpx.net\/"; var listType="huadu"; // 判断是否为手机端访问,跳转到相应页面 if (typeof(SYS_isWap) == "undefined"){ SYS_isWap = 1; } if (typeof(SYS_isPcToWap) == "undefined"){ SYS_isPcToWap = 0; } if (SYS_isWap == 1 && SYS_isPcToWap >= 1 ) { function GetCookieStr(offset) { var endstr = document.cookie.indexOf(";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return GetCookieStr(j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } var browser = { versions: function () { var u = navigator.userAgent, app = navigator.appVersion; return {//移动终端浏览器版本信息 trident: u.indexOf('Trident') > -1, //IE内核 presto: u.indexOf('Presto') > -1, //opera内核 webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核 gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核 mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //是否为移动终端 ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端 android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器 iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器 iPad: u.indexOf('iPad') > -1, //是否iPad webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部 winphone: u.indexOf('Windows Phone') > -1 //Windows Phone }; }(), language: (navigator.browserLanguage || navigator.language).toLowerCase(), appcookie: GetCookie('wap_hbpx') } if (listType.length == 0 || (listType.length > 0 && SYS_isAppWap == 1)) { var hascookie = browser.appcookie; var ref = document.referrer; var goUrl = jsPathPart + "selWapPc.aspx?mode=" + SYS_isPcToWap + "&appWap=" + SYS_isAppWap + "&go=wap&webID=" + webDataID + "&listType=" + listType; if (ref.toLocaleLowerCase().indexOf("m.hbpx.net") != -1) { hascookie = "pc"; } if ((hascookie == null) && (browser.versions.android == true || browser.versions.iPhone == true || browser.versions.winphone == true)) { document.location.href = goUrl; } else if ((hascookie != "pc") && (browser.versions.android == true || browser.versions.iPhone == true || browser.versions.winphone == true)) { document.location.href = goUrl; } } }