Commit 08db1d6ee014b01c4861dc42a3b51ff6b6ed1ac5
1 parent
f141e777
预热的秒杀要参与阶梯促销的
Showing
1 changed file
with
26 additions
and
0 deletions
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -5730,6 +5730,32 @@ Page({ |
5730 | 5730 | success: function (res) { |
5731 | 5731 | if (res.data.code == 0) { |
5732 | 5732 | var r_data = res.data.data; |
5733 | + | |
5734 | + if(r_data.ladderLists){ | |
5735 | + var act_id=r_data.ladderLists[0].form_id; | |
5736 | + //-- 判断会员能不能参与阶梯促销 -- | |
5737 | + getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid+"/"+user_id + "/"+act_id, { | |
5738 | + }).then(res=>{ | |
5739 | + if(res.data.code==0 && res.data.data){ | |
5740 | + var prom_content=""; | |
5741 | + for(let jj in r_data.ladderLists){ | |
5742 | + if(r_data.ladderLists[jj].discount==10){ | |
5743 | + prom_content+="第"+(parseInt(jj)+1)+"件原价,"; | |
5744 | + }else{ | |
5745 | + prom_content+="第"+(parseInt(jj)+1)+"件"+r_data.ladderLists[jj].discount+"折,"; | |
5746 | + } | |
5747 | + } | |
5748 | + prom_content=ut.sub_last(prom_content); | |
5749 | + th.data.prom_type=10; | |
5750 | + th.data.prom_id=act_id; | |
5751 | + th.setData({ | |
5752 | + jieti_prom:prom_content, | |
5753 | + ladder_act_id:act_id | |
5754 | + }) | |
5755 | + } | |
5756 | + }) | |
5757 | + } | |
5758 | + | |
5733 | 5759 | th.setData({ |
5734 | 5760 | prom_goods: r_data.promGoodsLists, |
5735 | 5761 | }) | ... | ... |