Showing
11 changed files
with
78 additions
and
20 deletions
| @@ -16,8 +16,6 @@ const _ = require('lodash'); | @@ -16,8 +16,6 @@ const _ = require('lodash'); | ||
| 16 | const api = global.yoho.API; | 16 | const api = global.yoho.API; |
| 17 | const serviceAPI = global.yoho.ServiceAPI; | 17 | const serviceAPI = global.yoho.ServiceAPI; |
| 18 | 18 | ||
| 19 | - | ||
| 20 | - | ||
| 21 | /** | 19 | /** |
| 22 | * 排序转换 | 20 | * 排序转换 |
| 23 | */ | 21 | */ |
| 1 | <div class="discount-page yoho-page"> | 1 | <div class="discount-page yoho-page"> |
| 2 | - <ul class="special-list"> | ||
| 3 | - {{#each data}} | ||
| 4 | - <li> | ||
| 5 | - <a href="{{specialUrl}}"> | ||
| 6 | - <img class="lazy" data-original="{{image coverUrl 640 250}}" /> | ||
| 7 | - <p class="special-cont"> | ||
| 8 | - <span class="special-title">{{title}}</span> | ||
| 9 | - <span class="special-time {{#if warnColor}}red-color{{/if}}">{{time}}</span> | ||
| 10 | - </p> | ||
| 11 | - </a> | ||
| 12 | - </li> | ||
| 13 | - {{/each}} | ||
| 14 | - </ul> | ||
| 15 | -</div> | ||
| 2 | + {{> resources/discount-activity}} | ||
| 3 | +</div> |
| @@ -10,6 +10,31 @@ | @@ -10,6 +10,31 @@ | ||
| 10 | {{#if smallPic}} | 10 | {{#if smallPic}} |
| 11 | {{> resources/thumb-row}} | 11 | {{> resources/thumb-row}} |
| 12 | {{/if}} | 12 | {{/if}} |
| 13 | + | ||
| 14 | + {{! 中间banner}} | ||
| 15 | + {{#if singleImage}} | ||
| 16 | + {{> resources/banner}} | ||
| 17 | + {{/if}} | ||
| 18 | + | ||
| 19 | + {{!-- 折扣专场 --}} | ||
| 20 | + {{#if discountActivity}} | ||
| 21 | + {{> resources/discount-activity}} | ||
| 22 | + {{/if}} | ||
| 23 | + | ||
| 24 | + {{!-- 会员专享 --}} | ||
| 25 | + {{#if vipFloor}} | ||
| 26 | + {{> resources/vip-floor}} | ||
| 27 | + {{/if}} | ||
| 28 | + | ||
| 29 | + {{!-- 断码区 --}} | ||
| 30 | + {{#if offCodeArea}} | ||
| 31 | + {{> resources/off-code-area}} | ||
| 32 | + {{/if}} | ||
| 33 | + | ||
| 34 | + {{!-- OUTLETS --}} | ||
| 35 | + {{#if titleImage}} | ||
| 36 | + {{> resources/goods-category}} | ||
| 37 | + {{/if}} | ||
| 13 | {{/content}} | 38 | {{/content}} |
| 14 | 39 | ||
| 15 | {{#floorHeader}} | 40 | {{#floorHeader}} |
| @@ -15,7 +15,7 @@ module.exports = { | @@ -15,7 +15,7 @@ module.exports = { | ||
| 15 | siteUrl: '//m.yohobuy.com', | 15 | siteUrl: '//m.yohobuy.com', |
| 16 | domains: { | 16 | domains: { |
| 17 | api: 'http://devapi.yoho.cn:58078/', | 17 | api: 'http://devapi.yoho.cn:58078/', |
| 18 | - service: 'http://devservice.yoho.cn:58077/' | 18 | + service: 'http://123.206.1.104:28077/' |
| 19 | }, | 19 | }, |
| 20 | useOneapm: false, | 20 | useOneapm: false, |
| 21 | useCache: false, | 21 | useCache: false, |
| @@ -91,4 +91,4 @@ if (isProduction) { | @@ -91,4 +91,4 @@ if (isProduction) { | ||
| 91 | useOneapm: true, | 91 | useOneapm: true, |
| 92 | useCache: true | 92 | useCache: true |
| 93 | }); | 93 | }); |
| 94 | -} | ||
| 94 | +} |
| 1 | {{# title}} | 1 | {{# title}} |
| 2 | <div class="floor-header-more"> | 2 | <div class="floor-header-more"> |
| 3 | - <h2>{{title}}</h2> | 3 | + <h2>{{#if title}}{{title}}{{else}}{{name}}{{/if}}</h2> |
| 4 | {{#if moreUrl}} | 4 | {{#if moreUrl}} |
| 5 | <a class="more-btn iconfont" href="{{moreUrl}}"></a> | 5 | <a class="more-btn iconfont" href="{{moreUrl}}"></a> |
| 6 | {{/if}} | 6 | {{/if}} |
| 7 | </div> | 7 | </div> |
| 8 | -{{/ title}} | ||
| 8 | +{{/ title}} |
| 1 | +{{#data}} | ||
| 2 | +{{#if ../discountActivity}} | ||
| 3 | + {{> common/floor-header-more}} | ||
| 4 | +{{/if}} | ||
| 5 | +<ul class="special-list"> | ||
| 6 | + {{#each list}} | ||
| 7 | + <li> | ||
| 8 | + <a href="{{specialUrl}}"> | ||
| 9 | + <img class="lazy" data-original="{{image coverUrl 640 250}}" /> | ||
| 10 | + <p class="special-cont"> | ||
| 11 | + <span class="special-title">{{title}}</span> | ||
| 12 | + <span class="special-time {{#if warnColor}}red-color{{/if}}">{{time}}</span> | ||
| 13 | + </p> | ||
| 14 | + </a> | ||
| 15 | + </li> | ||
| 16 | + {{/each}} | ||
| 17 | +</ul> | ||
| 18 | +{{/data}} |
| 1 | {{#data}} | 1 | {{#data}} |
| 2 | {{> common/floor-header-more}} | 2 | {{> common/floor-header-more}} |
| 3 | + {{log this}} | ||
| 3 | <div class="goods-category"> | 4 | <div class="goods-category"> |
| 4 | {{# bigImage}} | 5 | {{# bigImage}} |
| 5 | {{#if bigList}} | 6 | {{#if bigList}} |
| @@ -26,6 +27,7 @@ | @@ -26,6 +27,7 @@ | ||
| 26 | </div> | 27 | </div> |
| 27 | {{/if}} | 28 | {{/if}} |
| 28 | {{/ bigImage}} | 29 | {{/ bigImage}} |
| 30 | + {{#if list}} | ||
| 29 | <ul class="category-list clearfix"> | 31 | <ul class="category-list clearfix"> |
| 30 | {{# list}} | 32 | {{# list}} |
| 31 | <li> | 33 | <li> |
| @@ -42,5 +44,6 @@ | @@ -42,5 +44,6 @@ | ||
| 42 | </li> | 44 | </li> |
| 43 | {{/ list}} | 45 | {{/ list}} |
| 44 | </ul> | 46 | </ul> |
| 47 | + {{/if}} | ||
| 45 | </div> | 48 | </div> |
| 46 | {{/data}} | 49 | {{/data}} |
| @@ -33,6 +33,20 @@ module.exports = (list) => { | @@ -33,6 +33,20 @@ module.exports = (list) => { | ||
| 33 | } | 33 | } |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | + if (floor.titleImage && floor.data) { | ||
| 37 | + if (floor.data.image) { | ||
| 38 | + floor.data.bigImage = { | ||
| 39 | + bigList: [floor.data.image] | ||
| 40 | + }; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + floor.data.title = { | ||
| 44 | + moreName: floor.data.moreName, | ||
| 45 | + moreUrl: floor.data.moreUrl, | ||
| 46 | + title: floor.data.title | ||
| 47 | + }; | ||
| 48 | + } | ||
| 49 | + | ||
| 36 | formatData.push(floor); | 50 | formatData.push(floor); |
| 37 | }); | 51 | }); |
| 38 | 52 |
-
Please register or login to post a comment