Merge branch 'release/4.6' of git.yoho.cn:fe/yohobuy-node into release/4.6
Showing
8 changed files
with
39 additions
and
29 deletions
@@ -107,17 +107,16 @@ exports.getOutletsGoodsList = (params) => { | @@ -107,17 +107,16 @@ exports.getOutletsGoodsList = (params) => { | ||
107 | breakSort: _.isEmpty(params.breakSort) ? null : params.breakSort, | 107 | breakSort: _.isEmpty(params.breakSort) ? null : params.breakSort, |
108 | productPool: _.isEmpty(params.productPool) ? null : params.productPool, | 108 | productPool: _.isEmpty(params.productPool) ? null : params.productPool, |
109 | price: _.isEmpty(params.price) ? null : params.price, | 109 | price: _.isEmpty(params.price) ? null : params.price, |
110 | - outlets: _.isEmpty(params.outlets) ? 1 : params.outlets, | 110 | + outlets: params.outlets || 1, |
111 | yh_channel: yhChannel[tempChannel].channel | 111 | yh_channel: yhChannel[tempChannel].channel |
112 | }; | 112 | }; |
113 | 113 | ||
114 | let finalParams = {}; | 114 | let finalParams = {}; |
115 | 115 | ||
116 | _.forEach(tempParams, function(value, key) { | 116 | _.forEach(tempParams, function(value, key) { |
117 | - if (!_.isEmpty(value)) { | 117 | + if (value) { |
118 | finalParams[key] = value; | 118 | finalParams[key] = value; |
119 | } | 119 | } |
120 | }); | 120 | }); |
121 | - | ||
122 | return api.get('', sign.apiSign(finalParams)); | 121 | return api.get('', sign.apiSign(finalParams)); |
123 | }; | 122 | }; |
1 | -<div class="outlets-channel-page outlets-page center-content yoho-page" data-page="channel"> | ||
2 | - <div class="slide-container clearfix"> | ||
3 | - <div class="center-col col"> | ||
4 | - <ul class="slide-wrapper"> | ||
5 | - {{# left}} | ||
6 | - <li> | ||
7 | - <a href="{{href}}" target="_blank"> | ||
8 | - <img class="lazy" data-original="{{image img 865 450}}"> | ||
9 | - </a> | ||
10 | - </li> | ||
11 | - {{/ left}} | ||
12 | - </ul> | 1 | +<div class="outlets-channel-page outlets-page center-content yoho-page" data-page="girls"> |
2 | + {{# topBanner}} | ||
3 | + <div class="slide-container clearfix"> | ||
4 | + <div class="center-col col"> | ||
5 | + <ul class="slide-wrapper"> | ||
6 | + {{# left}} | ||
7 | + <li> | ||
8 | + <a href="{{url}}" target="_blank"> | ||
9 | + <img src="{{image src 865 450}}"> | ||
10 | + </a> | ||
11 | + </li> | ||
12 | + {{/ left}} | ||
13 | + </ul> | ||
14 | + </div> | ||
15 | + <div class="right-col col"> | ||
16 | + {{# right}} | ||
17 | + <a href="{{url}}" target="_blank"> | ||
18 | + <img src="{{image src 290 180}}"> | ||
19 | + </a> | ||
20 | + {{/ right}} | ||
21 | + </div> | ||
13 | </div> | 22 | </div> |
14 | - <div class="right-col col"> | ||
15 | - {{# right}} | ||
16 | - <a href="{{href}}" target="_blank"> | ||
17 | - <img class="lazy" data-original="{{image img 290 180}}"> | ||
18 | - </a> | ||
19 | - {{/ right}} | ||
20 | - </div> | ||
21 | - </div> | 23 | + {{/ topBanner}} |
22 | 24 | ||
23 | {{! 热门品类}} | 25 | {{! 热门品类}} |
24 | {{# hotCategory}} | 26 | {{# hotCategory}} |
@@ -30,4 +32,4 @@ | @@ -30,4 +32,4 @@ | ||
30 | 32 | ||
31 | {{! 最新折扣}} | 33 | {{! 最新折扣}} |
32 | {{> outlets/main-product}} | 34 | {{> outlets/main-product}} |
33 | -</div> | 35 | +</div> |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -47,11 +47,19 @@ function setPageTime() { | @@ -47,11 +47,19 @@ function setPageTime() { | ||
47 | var i, text, showTime; | 47 | var i, text, showTime; |
48 | 48 | ||
49 | for (i = 0; i < limitTime.length; i++) { | 49 | for (i = 0; i < limitTime.length; i++) { |
50 | + if (limitTime[i].time < 0) { | ||
51 | + return; | ||
52 | + } | ||
53 | + | ||
50 | limitTime[i].time -= 1000; | 54 | limitTime[i].time -= 1000; |
51 | showTime = convertTime(limitTime[i].time); | 55 | showTime = convertTime(limitTime[i].time); |
52 | - text = showTime; | ||
53 | - if (limitTime[i].pre) { | ||
54 | - text = limitTime[i].pre + ' ' + text; | 56 | + if (showTime) { |
57 | + text = showTime; | ||
58 | + if (limitTime[i].pre) { | ||
59 | + text = limitTime[i].pre + ' ' + text; | ||
60 | + } | ||
61 | + } else { | ||
62 | + text = '活动已结束'; | ||
55 | } | 63 | } |
56 | limitTime[i].dom.text(text); | 64 | limitTime[i].dom.text(text); |
57 | } | 65 | } |
@@ -42,11 +42,12 @@ exports.processProductList = (list, options) => { | @@ -42,11 +42,12 @@ exports.processProductList = (list, options) => { | ||
42 | return; | 42 | return; |
43 | } | 43 | } |
44 | 44 | ||
45 | + //折扣 | ||
46 | + product.discount = (product.salesPrice / product.marketPrice * 10).toFixed(1); | ||
47 | + | ||
45 | // 市场价和售价一样,则不显示市场价 | 48 | // 市场价和售价一样,则不显示市场价 |
46 | if (product.marketPrice === product.salesPrice) { | 49 | if (product.marketPrice === product.salesPrice) { |
47 | product.marketPrice = false; | 50 | product.marketPrice = false; |
48 | - } else if (product.marketPrice && product.salesPrice) { | ||
49 | - product.discount = (product.salesPrice / product.marketPrice * 10).toFixed(1); | ||
50 | } | 51 | } |
51 | 52 | ||
52 | // 判别默认的商品是否将默认的图片URL赋值到skn | 53 | // 判别默认的商品是否将默认的图片URL赋值到skn |
-
Please register or login to post a comment