diff --git a/packageE/pages/cart/cart2/zh_calculate.js b/packageE/pages/cart/cart2/zh_calculate.js index 4320243..79b0db4 100644 --- a/packageE/pages/cart/cart2/zh_calculate.js +++ b/packageE/pages/cart/cart2/zh_calculate.js @@ -11,6 +11,7 @@ module.exports = { offline_price = 0, offline_num = 0; let txt_ite = c_item.need_list; + //多个活动要拿来循环一下 for (let i in zh_prom_goods) { let title = ""; //提示语; @@ -43,7 +44,11 @@ module.exports = { let item = act_goos[j]; let item_j = goods.find(function (ele) { console.log('ele', ele); - return ele.goods_id == act_goos[j].goods_id; + if (ele.prom_type==7) { + return ele.goods_id == act_goos[j].goods_id; + }else{ + return false + } }) //-- 如果有找到的话 -- if (item_j) { @@ -117,7 +122,7 @@ module.exports = { } } - + //当满足组合的要求:总数要满足,起购数要满足 if (act && all_num >= act.zhbuyqty && !need_to_buy) { //商品的列表 @@ -367,7 +372,7 @@ module.exports = { tfeel += aprice; cut_price += all_price0 - aprice;; } - + c_item.zh_all_price = tfeel; c_item.zh_cut_price = cut_price;