Commit 645f1f7f34bc6ad48dac873e3f92f8625418b79a
1 parent
39b4c032
组合计算
Showing
1 changed file
with
2 additions
and
1 deletions
pages/cart/cart2/zh_calculate.js
... | ... | @@ -15,6 +15,7 @@ module.exports = { |
15 | 15 | let act_item = zh_prom_goods[i]; |
16 | 16 | let act_goos = act_item.gdlist; |
17 | 17 | let act = act_item.act; |
18 | + if(!act) continue; | |
18 | 19 | |
19 | 20 | let all_num = 0; //商品数量之和 |
20 | 21 | let all_price0 = 0; //商品数量之和 |
... | ... | @@ -103,7 +104,7 @@ module.exports = { |
103 | 104 | } |
104 | 105 | |
105 | 106 | //当满足组合的要求:总数要满足,起购数要满足 |
106 | - if (all_num >= act.zhbuyqty && !need_to_buy) { | |
107 | + if (act && all_num >= act.zhbuyqty && !need_to_buy) { | |
107 | 108 | |
108 | 109 | //商品的列表 |
109 | 110 | for (var u in act_goos) { | ... | ... |