From 40d4f29897a3e4990f52e031c14e33f130992dc1 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 10 Jan 2024 17:41:15 +0800 Subject: [PATCH] 待支付的重新支付的优化 --- pages/cart/cart/g_filter.wxs | 2 +- pages/user/order_detail/order_detail.js | 18 ++++++++++-------- pages/user/order_list/order_list.js | 18 ++++++++++-------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/pages/cart/cart/g_filter.wxs b/pages/cart/cart/g_filter.wxs index 306042d..7d66e0f 100644 --- a/pages/cart/cart/g_filter.wxs +++ b/pages/cart/cart/g_filter.wxs @@ -41,7 +41,7 @@ var g_filters = { map_str:function (content){ var string=''; if(content.is_money==1) string+='免'+content.money+'元|'; - if(content.is_sale==1) string+="打"+item.content.sale+"折|"; + if(content.is_sale==1) string+="打"+content.sale+"折|"; if(content.is_past==1) string+= "包邮|"; if(content.is_coupon==1) string+="送优惠券|"; if(content.is_int==1) string+="送积分|"; diff --git a/pages/user/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js index 1d9a052..2dcda9c 100644 --- a/pages/user/order_detail/order_detail.js +++ b/pages/user/order_detail/order_detail.js @@ -1066,14 +1066,16 @@ Page({ if (good.goods_price > gg.shop_price && good.offline_cut > 0) isok = 0; //如果线下价格比较贵,则不通过 } }else{ - switch (gg.discount_field){ - case 1: - if (good.goods_price != gg.shop_price) isok = 0; - break; - case 2: - if (good.goods_price != gg.market_price) isok = 0; - break; - } + if(good.prom_type==3){ + switch (gg.discount_field){ + case 1: + if (good.goods_price != gg.shop_price) isok = 0; + break; + case 2: + if (good.goods_price != gg.market_price) isok = 0; + break; + } + } } var is_h = 0; diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index 7722783..94ecad2 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -1123,7 +1123,6 @@ Page({ if(prom_pc){ gg.discount_field=prom_pc.discount_field; } - } @@ -1360,14 +1359,17 @@ Page({ if (good.goods_price > gg.shop_price && good.offline_cut > 0) isok = 0; //如果线下价格比较贵,则不通过 } }else{ - switch (gg.discount_field){ - case 1: - if (good.goods_price != gg.shop_price) isok = 0; + + if(good.prom_type==3){ + switch (gg.discount_field){ + case 1: + if (good.goods_price != gg.shop_price) isok = 0; + break; + case 2: + if (good.goods_price != gg.market_price) isok = 0; break; - case 2: - if (good.goods_price != gg.market_price) isok = 0; - break; - } + } + } } -- libgit2 0.21.4