From 5778d484f2ce1fa4481b558728bb9246ccd6645e Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Thu, 2 Dec 2021 17:17:51 +0800 Subject: [PATCH] 暂时再秒杀的情况下,才会显示继续· --- pages/goods/goodsInfo/goodsInfo.js | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 1499bcd..5ce06a8 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -836,7 +836,6 @@ Page({ t.data.data.prom_type=ee.data.prom_type; t.data.data.prom_id=ee.data.prom_id; } - ee.setData({ data: t.data.data, sele_g: t.data.data, @@ -1838,7 +1837,20 @@ Page({ return false; } - if(th.data.more_flash && open_store==1){ + var check_up=0; + if(th.data.more_flash){ + for(var i in th.data.more_flash){ + var item=th.data.more_flash[i]; + if(item.prom_type==1){ + check_up=1; + break + } + } + } + + + + if(check_up && open_store==1){ th.setData({is_pop_more:1}); }else{ var ind = t.currentTarget.dataset.ind; @@ -3096,9 +3108,8 @@ Page({ }); } }) - - } + if (prom_type == 1 && prom_id==0){ this.setData({ prom_type: 0,isshow: 1, @@ -4355,6 +4366,12 @@ Page({ context.fillText('强烈推荐', 64*unit, 672*unit); // 7.商品价格 let price = '¥' + this.data.data.shop_price; + + if(this.data.card_field && this.data.data[this.data.card_field]){ + price = '¥' + this.data.data[this.data.card_field]; + } + + // if (th.data.prom_act) // pri0 = th.data.prom_act.price; context.setFontSize(32*unit); @@ -4527,8 +4544,11 @@ Page({ context.setFontSize(23 * unit) context.setFillStyle("red") - var pri0 = th.data.data.shop_price; + if(th.data.card_field && th.data.data[th.data.card_field]){ + pri0=th.data.data[th.data.card_field]; + } + if (th.data.prom_act) pri0 = th.data.prom_price; pri0 = parseFloat(pri0).toFixed(2); -- libgit2 0.21.4