Authored by 郝肖肖

Merge branch 'feature/ordersCtx' into feature/payOrderCtx

... ... @@ -145,7 +145,7 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
};
// 划线的价格
if (it.last_vip_price < it.sales_price) {
if (+it.last_vip_price < +it.sales_price) {
goods.productPrice = transPrice(it.last_vip_price);
goods.linePrice = transPrice(it.sales_price); // 划线的价格
}
... ...
... ... @@ -780,13 +780,13 @@ const getRecommendProduct = (channelNum, uid, udid, page) => {
img: it.default_images ? helpers.image(it.default_images, 190, 250) : '',
alt: it.product_name,
price: '¥' + chelper.transPrice(it.sales_price),
marketPrice: (it.market_price && it.market_price > it.sales_price) ?
marketPrice: (it.market_price && +it.market_price > +it.sales_price) ?
'¥' + chelper.transPrice(it.market_price) : ''
};
item.href = helpers.getUrlBySkc(it.product_skn);
if (it.sales_price !== it.market_price) {
if (+it.sales_price !== +it.market_price) {
it.marketPrice = chelper.transPrice(it.market_price);
}
return item;
... ...
... ... @@ -395,13 +395,12 @@ module.exports = class extends global.yoho.BaseModel {
newGood.name = good.product_name;
newGood.color = good.factory_color_name;
newGood.size = good.size_name;
newGood.price = that.transPrice(good.sales_price);// 默认显示销售价
newGood.isVipPrice = good.discount_tag === 'V';
newGood.isStuPrice = good.discount_tag === 'S';
// 划线的价格
if (good.real_pay_price < good.sales_price) {
if (+good.real_pay_price < +good.sales_price) {
newGood.price = that.transPrice(good.real_pay_price);// 显示分摊价
newGood.linePrice = that.transPrice(good.sales_price); // 划线的价格
}
... ... @@ -829,7 +828,7 @@ module.exports = class extends global.yoho.BaseModel {
};
// 划线的价格
if (good.real_pay_price < good.sales_price) {
if (+good.real_pay_price < +good.sales_price) {
newGood.price = that.transPrice(good.real_pay_price);// 显示分摊价
newGood.linePrice = that.transPrice(good.sales_price); // 划线的价格
}
... ...