Commit 36c1710579c885f2e25b5209c3da113fd33ab459
1 parent
4922efcf
组合购多活动的优化
Showing
1 changed file
with
6 additions
and
4 deletions
packageE/pages/cart/cart2/cart2.js
@@ -1402,19 +1402,21 @@ Page({ | @@ -1402,19 +1402,21 @@ Page({ | ||
1402 | item1.is_order_yh=1; | 1402 | item1.is_order_yh=1; |
1403 | item1.is_post_temp=1; | 1403 | item1.is_post_temp=1; |
1404 | //如果是秒杀,团购的时候,优惠促销和搭配购的时候 | 1404 | //如果是秒杀,团购的时候,优惠促销和搭配购的时候 |
1405 | - if([1,2,3,5,6].indexOf(item1.prom_type)>-1){ | 1405 | + if([1,2,3,5,6,7].indexOf(item1.prom_type)>-1){ |
1406 | var url= "/api/weshop/activitylist/getSJGoodsPriceNew/" + os.stoid | 1406 | var url= "/api/weshop/activitylist/getSJGoodsPriceNew/" + os.stoid |
1407 | + "/" + item1.goods_id + "/"+item1.prom_type+"/" + item1.prom_id + "/" + app.globalData.user_id; | 1407 | + "/" + item1.goods_id + "/"+item1.prom_type+"/" + item1.prom_id + "/" + app.globalData.user_id; |
1408 | await app.request.promiseGet(url,{}).then(res=>{ | 1408 | await app.request.promiseGet(url,{}).then(res=>{ |
1409 | if(res.data.code==0){ | 1409 | if(res.data.code==0){ |
1410 | console.log(res.data.data,"111"); | 1410 | console.log(res.data.data,"111"); |
1411 | - item1.is_order_yh=res.data.data.is_order_yh; | 1411 | + |
1412 | + //组合促销有另外一个字段名is_orderyh,在控制订单促销的叠加 | ||
1413 | + if(item1.prom_type!=7) | ||
1414 | + item1.is_order_yh=res.data.data.is_order_yh; | ||
1412 | item1.is_post_temp=res.data.data.is_post_temp; | 1415 | item1.is_post_temp=res.data.data.is_post_temp; |
1413 | } | 1416 | } |
1414 | }) | 1417 | }) |
1415 | } | 1418 | } |
1416 | 1419 | ||
1417 | - | ||
1418 | } | 1420 | } |
1419 | 1421 | ||
1420 | 1422 | ||
@@ -2915,7 +2917,7 @@ Page({ | @@ -2915,7 +2917,7 @@ Page({ | ||
2915 | o_price += item[jc].goods_price * item[jc].goods_num; | 2917 | o_price += item[jc].goods_price * item[jc].goods_num; |
2916 | 2918 | ||
2917 | //--- 秒杀, 团购的时候,判断有没有订单优惠和包邮模板的叠加 --- | 2919 | //--- 秒杀, 团购的时候,判断有没有订单优惠和包邮模板的叠加 --- |
2918 | - if( [1,2,3,5,6].indexOf(item[jc].prom_type)>-1){ | 2920 | + if( [1,2,3,5,6,7].indexOf(item[jc].prom_type)>-1){ |
2919 | 2921 | ||
2920 | var gd_price=item[jc].goods_price; | 2922 | var gd_price=item[jc].goods_price; |
2921 | if(item[jc].account_fir) gd_price=item[jc].account_fir; | 2923 | if(item[jc].account_fir) gd_price=item[jc].account_fir; |