From 36c1710579c885f2e25b5209c3da113fd33ab459 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Thu, 16 Nov 2023 10:56:44 +0800 Subject: [PATCH] 组合购多活动的优化 --- packageE/pages/cart/cart2/cart2.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 64844de..7192fb8 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -1402,19 +1402,21 @@ Page({ item1.is_order_yh=1; item1.is_post_temp=1; //如果是秒杀,团购的时候,优惠促销和搭配购的时候 - if([1,2,3,5,6].indexOf(item1.prom_type)>-1){ + if([1,2,3,5,6,7].indexOf(item1.prom_type)>-1){ var url= "/api/weshop/activitylist/getSJGoodsPriceNew/" + os.stoid + "/" + item1.goods_id + "/"+item1.prom_type+"/" + item1.prom_id + "/" + app.globalData.user_id; await app.request.promiseGet(url,{}).then(res=>{ if(res.data.code==0){ console.log(res.data.data,"111"); - item1.is_order_yh=res.data.data.is_order_yh; + + //组合促销有另外一个字段名is_orderyh,在控制订单促销的叠加 + if(item1.prom_type!=7) + item1.is_order_yh=res.data.data.is_order_yh; item1.is_post_temp=res.data.data.is_post_temp; } }) } - } @@ -2915,7 +2917,7 @@ Page({ o_price += item[jc].goods_price * item[jc].goods_num; //--- 秒杀, 团购的时候,判断有没有订单优惠和包邮模板的叠加 --- - if( [1,2,3,5,6].indexOf(item[jc].prom_type)>-1){ + if( [1,2,3,5,6,7].indexOf(item[jc].prom_type)>-1){ var gd_price=item[jc].goods_price; if(item[jc].account_fir) gd_price=item[jc].account_fir; -- libgit2 0.21.4