|
@@ -1,27 +1,15 @@
|
|
|
;(function () {
|
|
|
- console.log('进来了')
|
|
|
// 判断移动端
|
|
|
var sUserAgent = navigator.userAgent.toLowerCase()
|
|
|
- if (
|
|
|
- /ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/.test(
|
|
|
- sUserAgent
|
|
|
- )
|
|
|
- ) {
|
|
|
+ if (/ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/.test(sUserAgent)) {
|
|
|
//跳转移动端页面
|
|
|
if (window.location.href.indexOf('mobile') < 0) {
|
|
|
- window.location.replace('/m_user') //跳转后没有后退功能
|
|
|
+ if(window.location.pathname =='/'){
|
|
|
+ window.location.replace('/m_user') //跳转后没有后退功能
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
- // PC端
|
|
|
- console.log('pc')
|
|
|
+ // PC端
|
|
|
+ console.log('pc',)
|
|
|
}
|
|
|
-})()
|
|
|
-(function(window){
|
|
|
- window.onresize=function(){
|
|
|
- rem();
|
|
|
- }
|
|
|
- function rem(){
|
|
|
- document.documentElement.style.fontSize = document.documentElement.clientWidth /7.2 + "px";
|
|
|
- }
|
|
|
- rem();
|
|
|
-})(window);
|
|
|
+})()
|