Commit 4922efcfec9792c5cd5dbacdc5a9790703c35a5e

Authored by yvan.ni
1 parent 7d442a9a

包邮规则的优化

packageE/pages/cart/cart2/cart2.js
@@ -963,23 +963,6 @@ Page({ @@ -963,23 +963,6 @@ Page({
963 //如果有购买活动 963 //如果有购买活动
964 item1.promgoodsbuynum = promgoodsbuynum; 964 item1.promgoodsbuynum = promgoodsbuynum;
965 965
966 - //默认是包邮和优惠的  
967 - item1.is_order_yh=1;  
968 - item1.is_post_temp=1;  
969 -  
970 - //如果是秒杀,团购的时候  
971 - if([1,2,3,6].indexOf(item1.prom_type)>-1){  
972 - var url= "/api/weshop/activitylist/getSJGoodsPriceNew/" + os.stoid  
973 - + "/" + item1.goods_id + "/"+item1.prom_type+"/" + item1.prom_id + "/" + app.globalData.user_id;  
974 - await app.request.promiseGet(url,{}).then(res=>{  
975 - if(res.data.code==0){  
976 - console.log(res.data.data,"111");  
977 - item1.is_order_yh=res.data.data.is_order_yh;  
978 - item1.is_post_temp=res.data.data.is_post_temp;  
979 - }  
980 - })  
981 - }  
982 -  
983 if(is_change){ 966 if(is_change){
984 carr[i].collocationList=null; 967 carr[i].collocationList=null;
985 } 968 }
@@ -1415,6 +1398,23 @@ Page({ @@ -1415,6 +1398,23 @@ Page({
1415 } 1398 }
1416 } 1399 }
1417 1400
  1401 + //默认是包邮和优惠的
  1402 + item1.is_order_yh=1;
  1403 + item1.is_post_temp=1;
  1404 + //如果是秒杀,团购的时候,优惠促销和搭配购的时候
  1405 + if([1,2,3,5,6].indexOf(item1.prom_type)>-1){
  1406 + var url= "/api/weshop/activitylist/getSJGoodsPriceNew/" + os.stoid
  1407 + + "/" + item1.goods_id + "/"+item1.prom_type+"/" + item1.prom_id + "/" + app.globalData.user_id;
  1408 + await app.request.promiseGet(url,{}).then(res=>{
  1409 + if(res.data.code==0){
  1410 + console.log(res.data.data,"111");
  1411 + item1.is_order_yh=res.data.data.is_order_yh;
  1412 + item1.is_post_temp=res.data.data.is_post_temp;
  1413 + }
  1414 + })
  1415 + }
  1416 +
  1417 +
1418 } 1418 }
1419 1419
1420 1420
@@ -2915,7 +2915,7 @@ Page({ @@ -2915,7 +2915,7 @@ Page({
2915 o_price += item[jc].goods_price * item[jc].goods_num; 2915 o_price += item[jc].goods_price * item[jc].goods_num;
2916 2916
2917 //--- 秒杀, 团购的时候,判断有没有订单优惠和包邮模板的叠加 --- 2917 //--- 秒杀, 团购的时候,判断有没有订单优惠和包邮模板的叠加 ---
2918 - if( [1,2,3,6].indexOf(item[jc].prom_type)>-1){ 2918 + if( [1,2,3,5,6].indexOf(item[jc].prom_type)>-1){
2919 2919
2920 var gd_price=item[jc].goods_price; 2920 var gd_price=item[jc].goods_price;
2921 if(item[jc].account_fir) gd_price=item[jc].account_fir; 2921 if(item[jc].account_fir) gd_price=item[jc].account_fir;