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, })