Showing
3 changed files
with
5 additions
and
12 deletions
@@ -26,9 +26,7 @@ | @@ -26,9 +26,7 @@ | ||
26 | {{/if}} | 26 | {{/if}} |
27 | </head> | 27 | </head> |
28 | <body> | 28 | <body> |
29 | - {{#if mobileRefer}} | ||
30 | - <input type="hidden" id="m-refer" value="{{mobileRefer}}"> | ||
31 | - {{/if}} | 29 | + {{> mobile-refer}} |
32 | 30 | ||
33 | {{> header}} | 31 | {{> header}} |
34 | {{> common/simple-header}} | 32 | {{> common/simple-header}} |
doraemon/views/partial/mobile-refer.hbs
0 → 100644
1 | +{{#if mobileRefer}} | ||
2 | + <input type="hidden" id="m-refer" value="{{mobileRefer}}"> | ||
3 | + <script type="text/javascript">var u=document.getElementById("m-refer").value;console.log(u);if(u&&window.navigator.userAgent.match(/(nokia|iphone|android|ipad|motorola|^mot\-|softbank|foma|docomo|kddi|up\.browser|up\.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\-|longcos|pantech|gionee|^sie\-|portalmmm|jig\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\s*mobi|opera\*mini|320x320|240x320|176x220)/i)){window.location=u};</script> | ||
4 | +{{/if}} |
@@ -94,15 +94,6 @@ function getShoppingKey() { | @@ -94,15 +94,6 @@ function getShoppingKey() { | ||
94 | return JSON.parse(c).k; | 94 | return JSON.parse(c).k; |
95 | } | 95 | } |
96 | 96 | ||
97 | -// page cache改造-前端移动端检测 | ||
98 | -(function() { | ||
99 | - var mrefer = $('#m-refer').val(); | ||
100 | - | ||
101 | - if (mrefer && window.navigator.userAgent.match(/(nokia|iphone|android|ipad|motorola|^mot\-|softbank|foma|docomo|kddi|up\.browser|up\.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\-|longcos|pantech|gionee|^sie\-|portalmmm|jig\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\s*mobi|opera\*mini|320x320|240x320|176x220)/i)) { // eslint-disable-line | ||
102 | - window.location = mrefer; | ||
103 | - } | ||
104 | -}()); | ||
105 | - | ||
106 | // YAS统计代码 | 97 | // YAS统计代码 |
107 | (function(w, d, s, j, f) { | 98 | (function(w, d, s, j, f) { |
108 | var a = d.createElement(s); | 99 | var a = d.createElement(s); |
-
Please register or login to post a comment