Authored by 陈峰

Merge branch 'feature/cart' into 'release/5.4.1'

套餐结算



See merge request !276
... ... @@ -60,7 +60,7 @@ exports.orderEnsure = (req, res, next) => {
if (req.query.activityType === 'bundle') {
let activityInfo = JSON.parse(req.cookies['activity-info']);
orderPromise = cartModel.cartPay(uid, cartType, orderInfo, sku, skn, buyNumber, activityInfo);
orderPromise = cartModel.cartPay(uid, cartType, null, null, sku, skn, buyNumber, activityInfo);
} else {
orderPromise = cartModel.cartPay(uid, cartType, orderInfo, sku, skn, buyNumber);
}
... ...
... ... @@ -40,7 +40,7 @@ exports.cartPayAPI = (uid, cartType, isUseYohoCoin, skuList, activityInfo) => {
// 购买套装和量贩商品时数据处理
if (activityInfo) {
param.activity_id = activityInfo.activity_id;
param.product_sku_list = activityInfo.product_sku_list;
param.product_sku_list = JSON.stringify(activityInfo.product_sku_list);
}
return api.get('', param, {cache: false});
... ...
... ... @@ -271,7 +271,8 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
result.cartPayData = cartData.promotion_formula_list;
result.num = cartData.goods_count;
result.goodsPrice = cartData.str_order_amount;
result.price = orderComputeData ? orderComputeData.last_order_amount : cartData.last_order_amount;
result.price = _.get(orderComputeData, 'last_order_amount', null) ?
orderComputeData.last_order_amount : cartData.last_order_amount;
if (cartData.gain_yoho_coin > 0) {
result.yohoCoinNum = cartData.gain_yoho_coin;
... ...