From 645f1f7f34bc6ad48dac873e3f92f8625418b79a Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Thu, 23 Dec 2021 16:38:55 +0800 Subject: [PATCH] 组合计算 --- pages/cart/cart2/zh_calculate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/cart/cart2/zh_calculate.js b/pages/cart/cart2/zh_calculate.js index f42189f..c23727e 100644 --- a/pages/cart/cart2/zh_calculate.js +++ b/pages/cart/cart2/zh_calculate.js @@ -15,6 +15,7 @@ module.exports = { let act_item = zh_prom_goods[i]; let act_goos = act_item.gdlist; let act = act_item.act; + if(!act) continue; let all_num = 0; //商品数量之和 let all_price0 = 0; //商品数量之和 @@ -103,7 +104,7 @@ module.exports = { } //当满足组合的要求:总数要满足,起购数要满足 - if (all_num >= act.zhbuyqty && !need_to_buy) { + if (act && all_num >= act.zhbuyqty && !need_to_buy) { //商品的列表 for (var u in act_goos) { -- libgit2 0.21.4