From 08db1d6ee014b01c4861dc42a3b51ff6b6ed1ac5 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Mon, 20 Dec 2021 17:39:30 +0800 Subject: [PATCH] 预热的秒杀要参与阶梯促销的 --- pages/goods/goodsInfo/goodsInfo.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+), 0 deletions(-) diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index cc37be2..a19b497 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -5730,6 +5730,32 @@ Page({ success: function (res) { if (res.data.code == 0) { var r_data = res.data.data; + + if(r_data.ladderLists){ + var act_id=r_data.ladderLists[0].form_id; + //-- 判断会员能不能参与阶梯促销 -- + getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid+"/"+user_id + "/"+act_id, { + }).then(res=>{ + if(res.data.code==0 && res.data.data){ + var prom_content=""; + for(let jj in r_data.ladderLists){ + if(r_data.ladderLists[jj].discount==10){ + prom_content+="第"+(parseInt(jj)+1)+"件原价,"; + }else{ + prom_content+="第"+(parseInt(jj)+1)+"件"+r_data.ladderLists[jj].discount+"折,"; + } + } + prom_content=ut.sub_last(prom_content); + th.data.prom_type=10; + th.data.prom_id=act_id; + th.setData({ + jieti_prom:prom_content, + ladder_act_id:act_id + }) + } + }) + } + th.setData({ prom_goods: r_data.promGoodsLists, }) -- libgit2 0.21.4