Authored by 陈峰

购物车量贩bug

... ... @@ -390,10 +390,12 @@ const handleBundleInfo = (apiResult) => {
let result = {};
if (apiResult && apiResult.code === 200 && apiResult.data) {
if (_.has(apiResult.data, 'bundleInfo')) {
result.num = apiResult.data.bundleInfo.bundleCount;
result.discount = _.has(apiResult.data.bundleInfo, 'discount') ? apiResult.data.bundleInfo.discount : false;
result.promotionPhrase = apiResult.data.bundleInfo.promotionPhrase;
let discountBuy = _.find(apiResult.data, bund => _.get(bund, 'bundleInfo.discountType') === 2);
if (discountBuy) {
result.num = discountBuy.bundleInfo.bundleCount;
result.discount = _.has(discountBuy.bundleInfo, 'discount') ? discountBuy.bundleInfo.discount : false;
result.promotionPhrase = discountBuy.bundleInfo.promotionPhrase;
}
}
... ...