From cc9ae3919440c0fc2ad1e1d3091dba3f7fb1fec3 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Thu, 6 Jul 2023 16:43:08 +0800 Subject: [PATCH] 购物车车的优化 --- pages/cart/cart/cart.js | 10 +++------- pages/goods/goodsList/goodsList.wxml | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index f3a774a..8f40d0d 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -2048,17 +2048,11 @@ Page({ }); //要先处理了,再来判断要不要显示凑单 th.doCheckAll(async function () { - if (a.prom_type == 3) { - e.data.duo_zp_num_arr = {}; - if (!a.selected) { - await e.check_prom_activity(pitems); - } + th.data.duo_zp_num_arr={}; //判断商品是不是优惠活动 for (var i in e.data.requestData) { - if (!a.selected && i == pitems) continue; await e.check_prom_activity(i); } - } }); } else { @@ -3976,6 +3970,7 @@ Page({ this.setData({ [gift_text]: null, }) + return false; } //-- 循环判断活动 -- @@ -4704,6 +4699,7 @@ Page({ th.data.change_act = 1; th.doCheckAll(async function () { + th.data.duo_zp_num_arr={}; for (var i in th.data.requestData) { await th.check_prom_activity(i) } diff --git a/pages/goods/goodsList/goodsList.wxml b/pages/goods/goodsList/goodsList.wxml index e7746b3..143baad 100644 --- a/pages/goods/goodsList/goodsList.wxml +++ b/pages/goods/goodsList/goodsList.wxml @@ -7,11 +7,11 @@ 满{{item.condition}} 减{{item.content.money}}元 - 包邮 + 包邮 打{{item.content.sale}}折 送{{item.content.int}}积分 送{{item.content.coupon}}元优惠券 - 送{{item.content.gift_name}} + 送{{item.content.zp_mode==1?'多赠品':item.content.gift_name}} 送{{item.content.lb_name}} -- libgit2 0.21.4