...
|
...
|
@@ -33,6 +33,10 @@ const index = uid => { |
|
|
|
|
|
let goods = theData.goods_list;
|
|
|
|
|
|
let shopping = theData.shopping_cart_data;
|
|
|
|
|
|
let packageList = shopping.package_list;
|
|
|
|
|
|
_.forEach(goods, theGoods => {
|
|
|
let splitName = theGoods.product_name.split(' ');
|
|
|
|
...
|
...
|
@@ -55,7 +59,26 @@ const index = uid => { |
|
|
|
|
|
theData.yoho_coin *= 100; // 有货币稀释
|
|
|
|
|
|
theData.shopping_cart_data.balanceCoin = theData.use_yoho_coin;
|
|
|
shopping.balanceCoin = theData.use_yoho_coin;
|
|
|
|
|
|
// 拆单后的邮费优惠计算
|
|
|
if (packageList) {
|
|
|
let shippingOrigin = 0;
|
|
|
let shippingCut = 0;
|
|
|
|
|
|
_.forEach(packageList, i => {
|
|
|
shippingOrigin += (i.shopping_orig_cost >>> 0);
|
|
|
shippingCut += (i.shopping_cut_cost >>> 0);
|
|
|
});
|
|
|
|
|
|
// 对运费的数据进行扩展
|
|
|
shippingCut === 0 || Object.assign(
|
|
|
_.filter(shopping.promotion_formula_list, i => i.promotion === '运费'), {
|
|
|
shippingCut: shippingCut,
|
|
|
shippingOrigin: shippingOrigin
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
|
|
|
return data;
|
|
|
}
|
...
|
...
|
|