layout.hbs
12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{title}}</title>
<meta name="keywords" content="{{keywords}}">
<meta name="description" content="{{description}}">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<meta name="referrer" content="always">
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#414141"/>
{{# canonical}}
<meta name="applicable-device" content="mobile">
<link rel="canonical" href="{{currentHref}}">
{{/ canonical}}
{{#if miphtml}}
<link rel="miphtml" href="{{miphtml}}">
{{/if}}
{{#dnsPrefetch.hosts}}
<link rel="dns-prefetch" href="{{this}}">
{{/dnsPrefetch.hosts}}
<script>
{{#ifand isProduction wap.open.bughd}}
window._timeStart = new Date().getTime();
window._yohoAppName = 'yohobuywap-node';
window._router = '{{_router}}';
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});var n=r(13),o=r(14);n.init(),o.init()},function(e,t){e.exports=function(e,t,r){if(void 0===t){var n=null;if(document.cookie)for(var o=document.cookie.split(";"),i=0;i<o.length;i++){var d=(o[i]||"").trim();if(d.substring(0,e.length+1)==e+"="){n=decodeURIComponent(d.substring(e.length+1));break}}return n}r=r||{},null===t&&(t="",r.expires=-1);var a="";if(r.expires&&("number"==typeof r.expires||r.expires.toUTCString)){var u;"number"==typeof r.expires?(u=new Date,u.setTime(u.getTime()+24*r.expires*60*60*1e3)):u=r.expires,a="; expires="+u.toUTCString()}var p=r.path?"; path="+r.path:"",s=r.domain?"; domain="+r.domain:"",c=r.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(t),a,p,s,c].join("")}},,function(e,t,r){var n=r(1),o=window._yohoAppName||"unknown",i={config:{reportUrl:"//badjs.yoho.cn/apm/yas2.gif"},stringify:function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r],o=[];for(var i in n)n.hasOwnProperty(i)&&o.push(i+"::"+n[i]);t.push(o.join("$$"))}return t.join("**")},report:function(e,t){if(e){(new Image).src=this.config.reportUrl+"?s="+o+"&l="+e+"&t="+(new Date).getTime(),t&&t()}},getUdid:function(){return n("udid")||""||0},getUid:function(){return(n("_UID")||"").split("::")[1]||0},getReqId:function(){return n("docreqid")||0},getRoute:function(){return window._router||""}};e.exports=i},,,,,,,,,,function(e,t,r){var n=r(1),o=r(3),i="_errLog",d={writeError:function(e,t,r,d,a){var u=JSON.parse(n(i)||"[]");u.push({tp:"err",msg:e,sc:t,ln:r,cn:d,pt:encodeURIComponent(location.href),u:o.getUid(),ud:o.getUdid(),rid:o.getReqId(),st:JSON.stringify(a&&a.stack),r:o.getRoute()}),n(i,JSON.stringify(u)),u.length>=5&&this.reportError()},clearError:function(){n(i,"[]")},reportError:function(){var e=this,t=JSON.parse(n(i)||"[]"),r=o.stringify(t);o.report(r,function(){e.clearError()})},init:function(){var e=this;window.onerror=function(t,r,n,o,i){e.writeError(t,r,n,o,i)},this.reportError()}};e.exports=d},function(e,t,r){function n(e){var t=e.offsetTop;return null!==e.offsetParent&&(t+=n(e.offsetParent)),t}var o=r(3),i=window.screen.height,d=[],a=!1,u=!1,p=0,s=setInterval(function(){var e,t;if(a){if(d.length)for(e=0;e<d.length;e++){if(t=d[e],!t.complete){u=!1;break}u=!0}else u=!0;u&&(p=(new Date).getTime()-_timeStart,clearInterval(s))}else{var r=document.body&&document.body.querySelectorAll("img")||[];for(e=0;e<r.length;e++){t=r[e];var o=n(t);if(o>i){a=!0;break}o<=i&&!t.hasPushed&&(t.hasPushed=1,d.push(t))}}},0),c={reportTime:function(e){var t=o.stringify(e);o.report(t)},addEvent:function(){var e=this,t=[],r=encodeURIComponent(location.href),n=o.getUid(),i=o.getUdid(),d=o.getReqId(),c=window.performance&&window.performance.timing.navigationStart||0,f=o.getRoute();_timeStart=window._timeStart||0,document.addEventListener&&document.addEventListener("DOMContentLoaded",function(e){t.push({tp:"dcl",t:(new Date).getTime()-_timeStart,pt:r,u:n,ud:i,rid:d,r:f}),(document.body&&document.body.querySelectorAll("img")||[]).length||(a=!0)},!1),window.addEventListener&&window.addEventListener("load",function(o){t.push({tp:"ld",t:(new Date).getTime()-_timeStart,pt:r,u:n,ud:i,rid:d,r:f}),u=!0,a=!0,s&&clearInterval(s),p&&t.push({tp:"fs",t:p,pt:r,u:n,ud:i,rid:d,r:f}),t.push({tp:"pf",dcl:(window.performance&&window.performance.timing.domComplete||0)-c,ld:(window.performance&&window.performance.timing.loadEventStart||0)-c,pt:r,u:n,ud:i,rid:d,r:f}),e.reportTime(t)},!1)},init:function(){this.addEvent()}};e.exports=c}]);
{{/ifand}}
</script>
{{!-- Android机器页面不再受到用户字体缩放强制改变大小 'http://m.blog.csdn.net/article/details?id=51275080' --}}
<script type="text/javascript">
var isWechat = /micromessenger/i.test(navigator.userAgent || '');
if (isWechat) {
document.title =document.title.replace(' | Yoho!Buy有货 | 潮流购物逛不停', '');
(function(){function setWechatSize(){if(typeof WeixinJSBridge!=="undefined"&&WeixinJSBridge.invoke){WeixinJSBridge.invoke("setFontSizeCallback",{fontSize:0},function(){})}}if(typeof WeixinJSBridge!=="undefined"){setTimeout(setWechatSize,0)}else{document.addEventListener("WeixinJSBridgeReady",function(){setTimeout(setWechatSize,0)})};}());
}
</script>
{{#if width750}}
<script type="text/javascript">
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=750){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/750)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
{{^}}
<script type="text/javascript">
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
{{/if}}
{{#if devEnv}}
{{#if localCss }}
<link rel="preload" as="style" href="//{{devHost}}:{{port}}/common.css?t={{startTime}}">
<link rel="stylesheet" media="all" href="//{{devHost}}:{{port}}/common.css?t={{startTime}}">
{{/if}}
{{#if isFeature}}
<link rel="preload" as="style" href="//{{devHost}}:{{port}}/feature.css?t={{startTime}}">
<link rel="stylesheet" media="all" href="//{{devHost}}:{{port}}/feature.css?t={{startTime}}">
{{else}}
{{#ifor localCss vue}}
<link rel="preload" as="style" href="//{{devHost}}:{{port}}/{{module}}.{{page}}.css?t={{startTime}}">
<link rel="stylesheet" media="all" href="//{{devHost}}:{{port}}/{{module}}.{{page}}.css?t={{startTime}}">
{{^}}
<link rel="preload" as="style" href="//{{devHost}}:{{port}}/index.css?t={{startTime}}">
<link rel="stylesheet" media="all" href="//{{devHost}}:{{port}}/index.css?t={{startTime}}">
{{/ifor}}
{{/if}}
{{else}}
{{#if localCss }}
<link rel="preload" as="style" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/common.css?t={{startTime}}">
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/common.css?t={{startTime}}">
{{/if}}
{{#if isFeature}}
<link rel="preload" as="style" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/feature.css?t={{startTime}}">
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/feature.css?t={{startTime}}">
{{else}}
{{#ifor localCss vue}}
<link rel="preload" as="style" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/{{module}}.{{page}}.css?t={{startTime}}">
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/{{module}}.{{page}}.css?t={{startTime}}">
{{^}}
<link rel="preload" as="style" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/index.css?t={{startTime}}">
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/index.css?t={{startTime}}">
{{/ifor}}
{{/if}}
{{/if}}
{{#if devEnv}}
<link rel="preload" as="script" href="//{{devHost}}:{{port}}/libs.js?t={{startTime}}"/>
<link rel="preload" as="script" href="//{{devHost}}:{{port}}/{{module}}.{{page}}.js?t={{startTime}}"/>
{{else}}
<link rel="preload" as="script" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/libs.js?t={{startTime}}"/>
<link rel="preload" as="script" href="//cdn.yoho.cn/yohobuywap-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}"/>
{{/if}}
<link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-6p.png" media="screen and (min-device-width: 1126px) and (max-device-width: 1242px)">
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-x.png" media="screen and (min-device-width: 751px) and (max-device-width: 1125px)">
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-6.png" media="screen and (min-device-width: 641px) and (max-device-width: 750px)">
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-5.png" media="screen and (max-device-width: 640px)">
</head>
<body class="{{pageStyle}}{{#if isWechat}} wechat-body{{/if}}{{#if width750}} width750{{/if}}{{#if isPassportPage}} passport-body{{/if}}{{#if isStarIndexPage}} star-index-bg{{/if}}{{#if isStarDetailPage}} star-class-body{{/if}}{{#if isInstallmentPage}} installment-body{{/if}}{{#if @root.isMarsApp}} is-mars-app{{/if}}{{#if @root.isNowApp}} is-now-app{{/if}}">
<div class="main-wrap" id="main-wrap" {{#if appPath}}data-apppath='{{{appPath}}}'{{/if}} {{#if miniPath}}data-miniPath='{{{miniPath}}}'{{/if}} {{#if @root.wap.wechat.backDownload}}data-backDownload='{{@root.wap.wechat.backDownload}}'{{/if}}>
{{#if systemUpdate}}
{{> updata}}
{{/if}}
{{#if showHeader}}
{{#unless isApp}}
{{> header}}
{{/unless}}
{{/if}}
{{{body}}}
{{#unless isApp}}
{{> footer}}
{{/unless}}
</div>
{{#if nodownload}}
<input type="hidden" id="no-download" value="no-download">
{{/if}}
{{#wechatShare}}
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.3.2.js" crossorigin="anonymous"></script>
{{/wechatShare}}
{{#loadJsBefore}}
<script src="{{src}}" crossorigin="anonymous"></script>
{{/loadJsBefore}}
{{#if devEnv}}
<script>
var STATIC_RESOURCE_HASH = '{{startTime}}';
var STATIC_RESOURCE_PATH = '//{{devHost}}:{{port}}';
</script>
<script src="//{{devHost}}:{{port}}/libs.js?t={{startTime}}" crossorigin="anonymous"></script>
<script src="//{{devHost}}:{{port}}/{{module}}.{{page}}.js?t={{startTime}}" crossorigin="anonymous"></script>
{{^}}
<script>
var STATIC_RESOURCE_HASH = '{{startTime}}';
var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/yohobuywap-node/{{version}}';
</script>
<script src="//cdn.yoho.cn/yohobuywap-node/{{version}}/libs.js?t={{startTime}}" crossorigin="anonymous"></script>
<script src="//cdn.yoho.cn/yohobuywap-node/{{version}}/{{module}}.{{page}}.js?t={{startTime}}" crossorigin="anonymous"></script>
{{/if}}
{{#unless devEnv}}
{{> analysis}}
{{/unless}}
</body>
</html>