new-arrial guang type helpers
Showing
3 changed files
with
32 additions
and
2 deletions
@@ -17,7 +17,7 @@ module.exports = { | @@ -17,7 +17,7 @@ module.exports = { | ||
17 | assetUrl: '//127.0.0.1:5001', | 17 | assetUrl: '//127.0.0.1:5001', |
18 | testCode: 'yoho4946abcdef#$%&!@', | 18 | testCode: 'yoho4946abcdef#$%&!@', |
19 | domains: { | 19 | domains: { |
20 | - api: 'http://api-test2.yohops.com:9999/', | 20 | + api: 'http://api-test3.yohops.com:9999/', |
21 | // api: 'http://api-test3.yohops.com:9999/', | 21 | // api: 'http://api-test3.yohops.com:9999/', |
22 | // service: 'http://service-test3.yohops.com:9999/', | 22 | // service: 'http://service-test3.yohops.com:9999/', |
23 | // liveApi: 'http://testapi.live.yohops.com:9999/', | 23 | // liveApi: 'http://testapi.live.yohops.com:9999/', |
1 | <div class="good-info"> | 1 | <div class="good-info"> |
2 | <div class="guang-article"> | 2 | <div class="guang-article"> |
3 | - <div class="cate tip">潮品</div> | 3 | + <a href="{{url}}"> |
4 | + {{guangType category_id}} | ||
4 | <img src="{{image src 322 214 1}}" alt=""> | 5 | <img src="{{image src 322 214 1}}" alt=""> |
5 | <div class="footer"> | 6 | <div class="footer"> |
6 | <p class="digest">{{title}}</p> | 7 | <p class="digest">{{title}}</p> |
@@ -13,5 +14,6 @@ | @@ -13,5 +14,6 @@ | ||
13 | </div> | 14 | </div> |
14 | </div> | 15 | </div> |
15 | </div> | 16 | </div> |
17 | + </a> | ||
16 | </div> | 18 | </div> |
17 | </div> | 19 | </div> |
public/hbs/product/new/guangType.js
0 → 100644
1 | +let Handlebars = require('handlebars'); | ||
2 | + | ||
3 | +module.exports = guangType => { | ||
4 | + let html = ''; | ||
5 | + | ||
6 | + switch(guangType) { | ||
7 | + case '1': | ||
8 | + html = '<div class="cate topic">话题</div>'; | ||
9 | + break; | ||
10 | + case '2': | ||
11 | + html = '<div class="cate collocation">搭配</div>'; | ||
12 | + break; | ||
13 | + case '3': | ||
14 | + html = '<div class="cate fashion-man">潮人</div>'; | ||
15 | + break; | ||
16 | + case '4': | ||
17 | + html = '<div class="cate fashion-good">潮品</div>'; | ||
18 | + break; | ||
19 | + case '5': | ||
20 | + html = '<div class="cate tip">小贴士</div>'; | ||
21 | + break; | ||
22 | + case '19': | ||
23 | + html = '<div class="cate tip">专题</div>'; | ||
24 | + break; | ||
25 | + } | ||
26 | + | ||
27 | + return new Handlebars.SafeString(html); | ||
28 | +}; |
-
Please register or login to post a comment