diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 7a5c8b6..117246e 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -929,11 +929,6 @@ Page({ sku: o.sku, }; - //如果是积分够,is_integral_normal就要有积分购普通购买字段 - if(o.prom_type==4){ - newd.is_integral_normal=1; - } - //-----如果是秒杀,团购,积分购,拼团----- if (th.data.prom_type == 1) { newd.goods_price = th.data.prom_price; diff --git a/pages/user/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js index 2ddd364..9747020 100644 --- a/pages/user/order_detail/order_detail.js +++ b/pages/user/order_detail/order_detail.js @@ -289,7 +289,7 @@ Page({ for(var i in order_goods){ var good=order_goods[i]; //如果不是小程序有的功能,直接提示要去3.0处理 - if(good.prom_type==2 || good.prom_type==4){ + if(good.prom_type==2 || good.prom_type==3 || good.prom_type==4 || good.prom_type==5){ wx.showModal({ title: '提示', content: '小程序还未有该活动,请到3.0公众号支付' @@ -330,8 +330,8 @@ Page({ }); return false; } - - if((good.prom_type==1 || good.prom_type==6 || good.prom_type==5 ) && !good.is_gift && !good.is_collocation){ + + if(good.prom_type==1 || good.prom_type==6){ if(gg.prom_type!=good.prom_type) { wx.showModal({ title: '提示', @@ -339,32 +339,6 @@ Page({ }); return false; } - if(good.prom_type==3 || good.prom_type==5){ - await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => { - }).then(res=>{ - if(res.data.code==0){ - var r_data=res.data.data; - if(!r_data.collocationPromList && good.prom_type==5){ - wx.showModal({ - title: '提示', - content: good.goods_name+'未找到活动' - }); - } - if(!r_data.promGoodsLists && good.prom_type==3){ - wx.showModal({ - title: '提示', - content: good.goods_name+'未找到活动' - }); - } - }else{ - wx.showModal({ - title: '提示', - content: good.goods_name+'未找到活动' - }); - return false; - } - }) - } }else{ @@ -400,25 +374,24 @@ Page({ } } } - - if(!good.is_gift && !good.is_collocation) { - var isok = 1; - var card_field = th.data.card_field; - //如果会员是等级会员,商品有等级价,且不是活动商品 - if (card_field && gg[card_field] > 0) { - if (good.goods_price != gg[card_field]) isok = 0; - } else { - if (good.goods_price != gg.shop_price) isok = 0; - - } - if (!isok) { - wx.showModal({ - title: '提示', - content: gg.goods_name + '商品的价格发生了变化' - }); - return false; - } - } + + + var isok=1; + var card_field=th.data.card_field; + //如果会员是等级会员,商品有等级价,且不是活动商品 + if(card_field && gg[card_field]>0){ + if (good.goods_price != gg[card_field]) isok = 0; + }else{ + if (good.goods_price != gg.shop_price) isok = 0; + + } + if(!isok){ + wx.showModal({ + title: '提示', + content: gg.goods_name+'商品的价格发生了变化' + }); + return false; + } //--如果是线下库存的时候-- if(th.data.conf.sales_rules==2){ diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index 7e87bc6..719f095 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -380,7 +380,7 @@ Page({ for(var i in order_goods){ var good=order_goods[i]; //如果不是小程序有的功能,直接提示要去3.0处理 - if(good.prom_type==2 || good.prom_type==4 ){ + if(good.prom_type==2 || good.prom_type==3 || good.prom_type==4 || good.prom_type==5){ wx.showModal({ title: '提示', content: '小程序还未有该活动,请到3.0公众号支付' @@ -422,7 +422,10 @@ Page({ return false; } - if((good.prom_type==1 || good.prom_type==6 || good.prom_type==5 ) && !good.is_gift && !good.is_collocation){ + + console.log("-----------------111-------------------"); + + if(good.prom_type==1 || good.prom_type==6){ if(gg.prom_type!=good.prom_type) { wx.showModal({ title: '提示', @@ -430,34 +433,9 @@ Page({ }); return false; } - if(good.prom_type==3 || good.prom_type==5){ - await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => { - }).then(res=>{ - if(res.data.code==0){ - var r_data=res.data.data; - if(!r_data.collocationPromList && good.prom_type==5){ - wx.showModal({ - title: '提示', - content: good.goods_name+'未找到活动' - }); - } - if(!r_data.promGoodsLists && good.prom_type==3){ - wx.showModal({ - title: '提示', - content: good.goods_name+'未找到活动' - }); - } - }else{ - wx.showModal({ - title: '提示', - content: good.goods_name+'未找到活动' - }); - return false; - } - }) - } - + }else{ + if(gg.prom_type==1 || gg.prom_type==6){ var prom=null; //---如果是活动的时候--- @@ -490,25 +468,24 @@ Page({ } } } - //赠品和搭配购不判断商品金额 + + var isok=1; var card_field=th.data.card_field; //如果会员是等级会员,商品有等级价,且不是活动商品 - if(!good.is_gift && !good.is_collocation) { - if (card_field && gg[card_field] > 0) { - if (good.goods_price != gg[card_field]) isok = 0; - } else { - if (good.goods_price != gg.shop_price) isok = 0; - - } - if (!isok) { - wx.showModal({ - title: '提示', - content: gg.goods_name + '商品的价格发生了变化' - }); - return false; - } - } + if(card_field && gg[card_field]>0){ + if (good.goods_price != gg[card_field]) isok = 0; + }else{ + if (good.goods_price != gg.shop_price) isok = 0; + + } + if(!isok){ + wx.showModal({ + title: '提示', + content: gg.goods_name+'商品的价格发生了变化' + }); + return false; + } //--如果是线下库存的时候-- if(th.data.conf.sales_rules==2){ diff --git a/utils/filter.wxs b/utils/filter.wxs index aa3ba54..b71c82d 100644 --- a/utils/filter.wxs +++ b/utils/filter.wxs @@ -1,6 +1,5 @@ var filters = { toFix:function(val,count){ - val=parseFloat(val); return val.toFixed(count) }, replace_time:function(val){