Merge branch 'feature/pieceGoods' into release/6.3
Showing
3 changed files
with
18 additions
and
2 deletions
@@ -837,7 +837,9 @@ module.exports = class extends global.yoho.BaseModel { | @@ -837,7 +837,9 @@ module.exports = class extends global.yoho.BaseModel { | ||
837 | name: it.product_name, | 837 | name: it.product_name, |
838 | img: it.default_images ? helpers.image(it.default_images, 190, 256) : '', | 838 | img: it.default_images ? helpers.image(it.default_images, 190, 256) : '', |
839 | price: '¥' + chelper.transPrice(it.sales_price), | 839 | price: '¥' + chelper.transPrice(it.sales_price), |
840 | - href: helpers.getUrlBySkc(it.product_skn) | 840 | + href: helpers.getUrlBySkc(it.product_skn), |
841 | + marketPrice: (it.market_price && +it.market_price > +it.sales_price) ? | ||
842 | + '¥' + chelper.transPrice(it.market_price) : '' | ||
841 | }; | 843 | }; |
842 | })); | 844 | })); |
843 | 845 |
@@ -17,7 +17,12 @@ | @@ -17,7 +17,12 @@ | ||
17 | </a> | 17 | </a> |
18 | <a class="name" href="{{href}}" target="_blank">{{name}}</a> | 18 | <a class="name" href="{{href}}" target="_blank">{{name}}</a> |
19 | <p class="price"> | 19 | <p class="price"> |
20 | - <span class="sale-price">{{price}}</span> | 20 | + {{#if marketPrice}} |
21 | + <span class="sale-price red">{{price}}</span> | ||
22 | + <span class="market-price">{{marketPrice}}</span> | ||
23 | + {{^}} | ||
24 | + <span class="sale-price">{{price}}</span> | ||
25 | + {{/if}} | ||
21 | </p> | 26 | </p> |
22 | <a class="btn-add-cart" | 27 | <a class="btn-add-cart" |
23 | {{#if id}}data-id="{{id}}"{{/if}} | 28 | {{#if id}}data-id="{{id}}"{{/if}} |
@@ -871,6 +871,10 @@ | @@ -871,6 +871,10 @@ | ||
871 | height: 100%; | 871 | height: 100%; |
872 | } | 872 | } |
873 | 873 | ||
874 | + .red { | ||
875 | + color: #c51c1c; | ||
876 | + } | ||
877 | + | ||
874 | .name, | 878 | .name, |
875 | .price { | 879 | .price { |
876 | font-size: 12px; | 880 | font-size: 12px; |
@@ -881,6 +885,11 @@ | @@ -881,6 +885,11 @@ | ||
881 | display: block; | 885 | display: block; |
882 | } | 886 | } |
883 | 887 | ||
888 | + .market-price { | ||
889 | + text-decoration: line-through; | ||
890 | + margin-left: 15px; | ||
891 | + } | ||
892 | + | ||
884 | .btn-add-cart { | 893 | .btn-add-cart { |
885 | width: 100px; | 894 | width: 100px; |
886 | height: 30px; | 895 | height: 30px; |
-
Please register or login to post a comment