diff --git a/pages/user/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js index d6bfd10..6de7ccf 100644 --- a/pages/user/order_detail/order_detail.js +++ b/pages/user/order_detail/order_detail.js @@ -467,7 +467,7 @@ Page({ if(res.data.code==0 && res.data.data && res.data.data.length){ for(let i in res.data.data){ let item=res.data.data[i]; - if(item.prom_type==3) { + if(item.prom_type==3 || item.prom_type==5) { is_g_prom=1; break; } } @@ -527,7 +527,8 @@ Page({ th.setData({paying:0});return false; } } - + + //商品的普通购买 ,不要进行判断 if((good.prom_type==1 || good.prom_type==2 || good.prom_type==6 || good.prom_type==4) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal){ if(gg.prom_type!=good.prom_type && gg.prom_type>0) { @@ -593,7 +594,7 @@ Page({ } }else{ //不是赠品的时候 - if(!good.is_gift && good.prom_type!=3){ + if(!good.is_gift && good.prom_type!=3 && !good.is_collocation ){ var t_ok=1; await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0"+"/"+getApp().globalData.user_id, {}).then(res => { if(res.data.code==0){ diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index 4280e7f..ce01aad 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -703,6 +703,8 @@ Page({ th.setData({paying:0}); return false; } + + //当是组合优惠的时候 if (good.prom_type == 7) { //如果有组合购 @@ -768,6 +770,7 @@ Page({ } } + //如果是预售的时候, if(good.prom_type==8) { await getApp().request.promiseGet("/api/weshop/order/orderPresell/countBuyGoodsSum",{ @@ -814,6 +817,7 @@ Page({ } } + //如果优惠促销和搭配购的时候 if ((good.prom_type == 3 || good.prom_type == 5) && good.is_gift != 1 && good.is_collocation != 1) { var p_ok = 1,is_g_prom=0; @@ -823,15 +827,18 @@ Page({ store_id:os.stoid,goodsidlist:good.goods_id,is_detail:1,user_id:user_id }; await getApp().request.promiseGet(url, {data:req_data}).then(async function (res) { + debugger if(res.data.code==0 && res.data.data && res.data.data.length){ for(let i in res.data.data){ let item=res.data.data[i]; - if(item.prom_type==3) { + if(item.prom_type==3 || item.prom_type==5){ is_g_prom=1; break; } } } }) + + if(is_g_prom){ await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + good.goods_id + "/0"+"/"+getApp().globalData.user_id, {}).then(res => { if (res.data.code == 0) { @@ -881,12 +888,17 @@ Page({ }) } + + + if (!p_ok){ th.setData({paying:0}); return false; } } + + //商品的普通购买 ,不要进行判断 if ((good.prom_type == 1 || good.prom_type == 2 || good.prom_type == 6 || good.prom_type == 4 || good.prom_type == 8) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal) { @@ -898,6 +910,8 @@ Page({ } } else { + + if ((gg.prom_type == 1 || good.prom_type == 2 || gg.prom_type == 3 || gg.prom_type == 5 || gg.prom_type == 6 || gg.prom_type == 4) && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) { var prom = null; @@ -911,7 +925,9 @@ Page({ } }) } - + + + if (gg.prom_type == 2) { await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/"+ gg.goods_id + "/" + gg.prom_id, {}).then(res => { if (res.data.code == 0) { @@ -920,7 +936,8 @@ Page({ } }) } - + + if (gg.prom_type == 6) { await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + gg.prom_id, {}).then(res => { @@ -952,7 +969,7 @@ Page({ } } else { - if (!good.is_gift && good.prom_type != 3) { + if (!good.is_gift && good.prom_type != 3 && !good.is_collocation) { var t_ok = 1; await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + good.goods_id + "/0"+"/"+getApp().globalData.user_id, {}).then(res => { if (res.data.code == 0) { @@ -972,6 +989,8 @@ Page({ //-- 如果有参加线下取价 -- if (good.offline_cut > 0) wlist += encodeURIComponent(gg.erpwareid) + ","; } + + //赠品和搭配购不判断商品金额 var isok = 1; var card_field = th.data.card_field;