From 46edf7aa9eeab126535320edb521f158e48a4a7e Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 17 Nov 2021 09:47:14 +0800 Subject: [PATCH] 1.团购限制使用优惠券。 2.自定义团购的商品销量要显示虚拟数量 --- components/diy_goodsGroup/diy_goodsGroup.js | 11 +++++++---- pages/cart/cart2/cart2.js | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js index ac15a10..ebfd0dd 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.js +++ b/components/diy_goodsGroup/diy_goodsGroup.js @@ -504,7 +504,7 @@ Component({ if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { var arr = res.data.data[0]; item.prom_price = arr.luck_goods_price; - item.sales_sum=arr.buy_goodnum + item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0); } }) break; @@ -517,9 +517,12 @@ Component({ var prom =null; if(res && res.data) prom=res.data.data; if (prom != null && prom.is_end==0 && prom.end_time>now && (prom.start_time { + if (res.data.code == 0) prom1 = res.data.data; + }) + if(!prom1.isQuan){ + continue; + } + } + //如果有限制使用优惠券,就要返回 if (gd.prom_type == 3) { if (th.data.prom_goods_map[pickup_id][gd.prom_id].is_xz_yh) continue; @@ -3466,6 +3484,7 @@ Page({ arr[ind].ckeck_quan_price = ckeck_quan_price - cut_price; arr[ind].check_quan_ware_list = check_quan_ware_list; arr[ind].check_quan_price_list = check_quan_price_list; + arr[ind].is_xz_yh = is_xz_yh; //是否关闭使用优惠券 if (th.data.is_close_quan != 1 && !is_xz_yh) { @@ -3475,7 +3494,7 @@ Page({ data: { storeId: oo.stoid, userId: app.globalData.user_id, - BuySum: ckeck_quan_price, + BuySum: arr[ind].ckeck_quan_price, WareIds: check_quan_ware_list, pageSize: 100 } -- libgit2 0.21.4