index.hbs
11.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<div class="guang-detail-page guang-page yoho-page {{#if guangDetail}}guang-detail{{/if}} {{#if guangEzine}}guang-ezine{{/if}}">
{{# guang}}
<div id="wrapper" >
<div id="scroller" class="{{channel}}">
{{!-- {{#if isShare}} --}}
{{> wei-guang/guang-header}}
{{!-- {{/if}} --}}
{{# author}}
<div class="author" data-id={{id}}>
<a class="clearfix" href={{url}}>
<img class="avatar" src={{image2 avatar mode=2 q=60}}>
<span class="name">{{name}}</span>
<span class="intro">{{intro}}</span>
</a>
</div>
{{/ author}}
{{# detail}}
<div class="detail" data-id="{{id}}">
<div class="post-title">
<p class="title">{{title}}</p>
{{> index/tvls}}
</div>
<div class="post-content">
{{# content}}
{{#if text}}
<div class="post-block text-block">
{{{text}}}
</div>
{{/if}}
{{#if bigImage}}
<div class="post-block big-img-block">
{{#if noLazy}}
<img src={{image2 bigImage q=60}}>
{{else}}
<img class="lazy" data-original={{image2 bigImage q=60}}>
{{/if}}
</div>
{{/if}}
{{#if smallImage}}
<div class="post-block small-img-block clearfix">
{{#if noLazy}}
{{# smallImage}}
<img src={{image2 src q=60}}>
{{/ smallImage}}
{{else}}
{{# smallImage}}
<img class="lazy" data-original={{image2 src q=60}}>
{{/ smallImage}}
{{/if}}
</div>
{{/if}}
{{#if weixinPublic}}
<div class="weixin post-block">
{{#each weixinPublic}}
<a href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{wechat_id}}"}}' class="ems-cnpl">
<img class="weixin-img" src="{{src}}">
</a>
{{/each}}
</div>
{{/if}}
{{#if shareCode}}
<div class="share-code">
{{# shareCode}}
<img class="wei-share" src="{{codeShare}}"></img>
{{/ shareCode}}
</div>
{{/if}}
{{#if collocation}}
<div class="post-block collocation-block">
<ul class="thumb-container">
{{#each collocation}}
<li class="thumb {{#if @first}}focus{{/if}}">
<img class="thumb-img lazy" data-original={{thumb}}>
<span class="clothe-type {{type}}"></span>
</li>
{{/each}}
</ul>
<div class="good-list clearfix">
{{#each collocation}}
<div class="prod {{#unless @first}}hide{{/unless}}">
{{# goods}}
{{> good}}
{{/ goods}}
</div>
{{/each}}
</div>
</div>
{{/if}}
{{#if moreLink}}
<a class="post-block link-block" href="{{moreLink}}">
更多商品
<span class="iconfont"></span>
</a>
{{/if}}
{{#if relatedReco}}
<div class="post-block related-reco-block clearfix">
<h2>相关推荐</h2>
{{#if relatedReco.id}}
{{#with relatedReco}}
<div class="one-good">
<img class="thumb lazy" data-original={{thumb}}>
<div class="content-container">
<p>
<span class="reco-name">{{name}}</span>
</p>
<p class="price">
<span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
{{#price}}
<span class="market-price">¥{{.}}</span>
{{/price}}
<a class="check-detail" href={{url}}>
查看详情
</a>
</p>
</div>
</div>
{{/with}}
{{^}}
<div class="good-list clearfix">
{{# relatedReco}}
{{> good}}
{{/ relatedReco}}
</div>
{{/if}}
</div>
{{/if}}
{{/ content}}
</div>
</div>
{{/ detail}}
{{#if relatedBrand}}
<div class="related-brand">
<h2>相关品牌</h2>
<ul class="brand-list clearfix">
{{# relatedBrand}}
<li class="brand buriedpoint" data-bp-id="guang_brand_{{name}}_0">
<a href={{url}}>
<div class="brand-logo">
<img class="lazy" data-original={{thumb}}>
</div>
<p class="brand-name">{{name}}</p>
</a>
</li>
{{/ relatedBrand}}
</ul>
</div>
{{/if}}
{{#if relatedTag}}
<div class="related-tag">
<div class="tag-bg"></div>
<ul class="tag-list clearfix">
{{# relatedTag}}
<li class="buriedpoint" data-bp-id="guang_tab_{{name}}_0">
<a href={{url}}>{{name}}</a>
</li>
{{/ relatedTag}}
</ul>
</div>
{{/if}}
{{#if relatedInfo}}
<div class="related-info">
<h2>相关文章</h2>
<ul class="info-list">
{{# relatedInfo}}
<li data-bp-id="guang_article_{{title}}_0" class="buriedpoint">
<a class="clearfix" href={{url}}>
<img class="lazy {{#if squareThumb}}square{{/if}}" data-original={{thumb}}>
<span class="title">{{title}}</span>
<span class="publish-time">
<i class="iconfont"></i>
{{publishTime}}
</span>
</a>
</li>
{{/ relatedInfo}}
</ul>
</div>
{{/if}}
{{#if isShare}}
<div class="down-bottom"></div>
{{/if}}
</div>
{{# wxFooter}}
<div class="wx-footer-c">
{{> wx-footer}}
</div>
{{/ wxFooter}}
</div>
{{!-- wx-share --}}
<input id="shareLink" type="hidden" value="{{shareLink}}">
<input id="shareImg" type="hidden" value="{{shareImg}}">
<input id="shareTitle" type="hidden" value="{{shareTitle}}">
<input id="shareDesc" type="hidden" value="{{shareDesc}}">
{{/ guang}}
{{#if isShare}}
<div class="float-layer" id="float-layer-app">
<div class="float-layer-left">
<span class="yoho-icon iconfont"></span>
<p><span>Yoho!buy有货</span><br>潮流有货逛不停</p>
</div>
<a href="javascript:void(0);" id="float-layer-close" >
<i class="close-icon iconfont"></i>
<div class="circle-rightbottom"></div>
</a>
<a href="javascript:void(0);" id="float-layer-btn">
前往下载
</a>
</div>
{{/if}}
{{> common/suspend-home}}
<div class="overlay"></div>
</div>
{{#if isShare}}
{{> wei-guang/side-nav}}
{{/if}}
<script type="text/javascript">
var isWechat = /micromessenger/i.test(navigator.userAgent || ''),
isqq = /MQQBrowser/i.test(navigator.userAgent || ''),
isWeibo = navigator.userAgent.toLowerCase().indexOf('weibo') !== -1;
if (isWechat || isqq || isWeibo) {
document.getElementById('guang-header').classList.remove('hide');
document.getElementById('yoho-header').classList.add('hide');
}
</script>