Authored by yyq

market price

... ... @@ -837,7 +837,9 @@ module.exports = class extends global.yoho.BaseModel {
name: it.product_name,
img: it.default_images ? helpers.image(it.default_images, 190, 256) : '',
price: '¥' + chelper.transPrice(it.sales_price),
href: helpers.getUrlBySkc(it.product_skn)
href: helpers.getUrlBySkc(it.product_skn),
marketPrice: (it.market_price && +it.market_price > +it.sales_price) ?
'¥' + chelper.transPrice(it.market_price) : ''
};
}));
... ...
... ... @@ -17,7 +17,12 @@
</a>
<a class="name" href="{{href}}" target="_blank">{{name}}</a>
<p class="price">
<span class="sale-price">{{price}}</span>
{{#if marketPrice}}
<span class="sale-price red">{{price}}</span>
<span class="market-price">{{marketPrice}}</span>
{{^}}
<span class="sale-price">{{price}}</span>
{{/if}}
</p>
<a class="btn-add-cart"
{{#if id}}data-id="{{id}}"{{/if}}
... ...
... ... @@ -871,6 +871,10 @@
height: 100%;
}
.red {
color: #c51c1c;
}
.name,
.price {
font-size: 12px;
... ... @@ -881,6 +885,11 @@
display: block;
}
.market-price {
text-decoration: line-through;
margin-left: 15px;
}
.btn-add-cart {
width: 100px;
height: 30px;
... ...