From 75550135e87c9318fab92270d55d98ffa3d450cd Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Wed, 22 Mar 2023 18:02:08 +0800 Subject: [PATCH] 搭配预存优化 --- packageE/pages/cart/cart2/cart2.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index f36e122..d3dec1f 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -363,7 +363,7 @@ Page({ this.setData({ [txt]: 2 }) } //搭配购直接购买特殊处理 - if(this.data.collocation_goods && this.data.cartlist){ + if(this.data.collocation_goods && this.data.collocation_goods.length>0 && this.data.cartlist){ let txt = 'cartlist[0].yck_off'; let txt1 = 'old_cartlist[0].yck_off'; if (this.data.cartlist[0].yck_off == 2) { @@ -2878,7 +2878,7 @@ Page({ if (!good) return false; - //搭配的计算要用购物的车计算方法 + //搭配的计算要用购物的车计算方法 // if (good.prom_type == 5 ) { if (good.prom_type == 5 ) { @@ -3226,7 +3226,7 @@ Page({ } else { th.setData({ [order_prom_txt1]: 0, [order_prom_txt2]: 0 }) } - + //预存金额使用参与计算 if (th.data.udata && th.data.udata.Balance > 0 && order_m * 1 > 0) { if (!th.data.bn_goods.keyid) { @@ -6533,6 +6533,7 @@ Page({ select_coll(e) { console.log("--1111--aaa--"); console.log(e); + //-- 如果是购物车的选择添加搭配商品 -- if (e.detail.is_cart == 1) { this.select_coll_buy_cart(e.detail); -- libgit2 0.21.4