Showing
4 changed files
with
18 additions
and
4 deletions
@@ -53,6 +53,10 @@ | @@ -53,6 +53,10 @@ | ||
53 | <img class="lazy" data-original={{image2 src q=60}}> | 53 | <img class="lazy" data-original={{image2 src q=60}}> |
54 | {{/ smallImage}} | 54 | {{/ smallImage}} |
55 | {{/if}} | 55 | {{/if}} |
56 | + | ||
57 | + {{#tagList}} | ||
58 | + {{> detail/img-label}} | ||
59 | + {{/tagList}} | ||
56 | </div> | 60 | </div> |
57 | {{/if}} | 61 | {{/if}} |
58 | 62 |
1 | -<div class="label-box" style="top: 30px; left: 40px;"> | 1 | +<div class="label-box" style="top: {{top}}px; left: {{left}}px;" data-skn="{{product_skn}}"> |
2 | <div class="lable-focus"> | 2 | <div class="lable-focus"> |
3 | <div class="focus-big"> | 3 | <div class="focus-big"> |
4 | <div class="focus-small"></div> | 4 | <div class="focus-small"></div> |
5 | </div> | 5 | </div> |
6 | </div> | 6 | </div> |
7 | - <div class="lable-info-box"> | ||
8 | - <span class="lable-text">这个是商品标题</span> | ||
9 | - </div> | 7 | + <div class="lable-info-box"><a href="{{href}}">{{tagName}}</a></div> |
10 | <div class="lable-btn"> | 8 | <div class="lable-btn"> |
11 | <span class="iconfont"></span> | 9 | <span class="iconfont"></span> |
12 | <span class="iconfont plus"></span> | 10 | <span class="iconfont plus"></span> |
@@ -145,7 +145,15 @@ $focus-size: 42px; | @@ -145,7 +145,15 @@ $focus-size: 42px; | ||
145 | border-bottom-left-radius: 40px; | 145 | border-bottom-left-radius: 40px; |
146 | float: left; | 146 | float: left; |
147 | line-height: 46px; | 147 | line-height: 46px; |
148 | + width: 200px; | ||
148 | height: 46px; | 149 | height: 46px; |
150 | + overflow: hidden; | ||
151 | + text-overflow: ellipsis; | ||
152 | + white-space: nowrap; | ||
153 | + } | ||
154 | + | ||
155 | + .lable-info-box > a { | ||
156 | + color: #fff; | ||
149 | } | 157 | } |
150 | 158 | ||
151 | .lable-btn { | 159 | .lable-btn { |
@@ -261,11 +261,15 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW | @@ -261,11 +261,15 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW | ||
261 | 261 | ||
262 | if (tagList.length > 0) { | 262 | if (tagList.length > 0) { |
263 | _.forEach(tagList, (tag, tagIndex) => { | 263 | _.forEach(tagList, (tag, tagIndex) => { |
264 | + // 产生位置 | ||
264 | tagList[tagIndex].top = _randomNumForLabel(height / 2, | 265 | tagList[tagIndex].top = _randomNumForLabel(height / 2, |
265 | alreadyTop); | 266 | alreadyTop); |
266 | alreadyTop.push(tagList[tagIndex].top); | 267 | alreadyTop.push(tagList[tagIndex].top); |
267 | tagList[tagIndex].left = _randomNumForLabel(175); | 268 | tagList[tagIndex].left = _randomNumForLabel(175); |
268 | alreadyLeft.push(tagList[tagIndex].left); | 269 | alreadyLeft.push(tagList[tagIndex].left); |
270 | + | ||
271 | + // 链接 | ||
272 | + tagList[tagIndex].href = '//m.yohobuy.com/product/' + tag.product_skn + '.html'; | ||
269 | }); | 273 | }); |
270 | } | 274 | } |
271 | 275 |
-
Please register or login to post a comment