...
|
...
|
@@ -14,6 +14,14 @@ const TICKETS = { |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 格式化价格
|
|
|
* @private
|
|
|
*/
|
|
|
const transPrice = (price, isSepcialZero) => {
|
|
|
return (price > 0 || isSepcialZero) ? parseFloat(price).toFixed(2) : 0;
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 格式化订单商品
|
|
|
* @private
|
|
|
*/
|
...
|
...
|
@@ -26,18 +34,27 @@ const _formatOrderGoods = (orderGoods, count, haveLink, tickets) => { |
|
|
name: value.product_name,
|
|
|
color: value.factory_color_name ? value.factory_color_name : value.color_name,
|
|
|
size: value.size_name,
|
|
|
price: value.goods_price,
|
|
|
count: value.buy_number
|
|
|
payPrice: value.real_pay_price,
|
|
|
salePrice: transPrice(value.sales_price) || value.good,
|
|
|
count: value.buy_number,
|
|
|
isVipPrice: value.discount_tag === 'V',
|
|
|
isStudebt: value.discount_tag === 'S'
|
|
|
};
|
|
|
|
|
|
if (parseInt(value.real_pay_price, 10) === parseInt(value.sales_price, 10)) {
|
|
|
goods.salePrice = false;
|
|
|
}
|
|
|
|
|
|
/* gift=>是否赠品,advanceBuy=>是否加价购 */
|
|
|
if (value.goods_type === 'gift') {
|
|
|
Object.assign(goods, {
|
|
|
gift: true
|
|
|
gift: true,
|
|
|
salePrice: transPrice(value.sales_price)
|
|
|
});
|
|
|
} else if (value.goods_type === 'price_gift') {
|
|
|
Object.assign(goods, {
|
|
|
advanceBuy: true
|
|
|
advanceBuy: true,
|
|
|
salePrice: transPrice(value.sales_price)
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|