Commit 6eb002013d210d75eb388223fbc22992b5e17aa6

Authored by yvan.ni
1 parent 1a5dd372

提交订单的时候,就要让达不到条件的商品活动prom_type=0

packageE/pages/cart/cart2/cart2.js
... ... @@ -4777,6 +4777,21 @@ Page({
4777 4777 goods.quan_num = g_item.quan_num;
4778 4778 goods.quan_no = g_item.quan_no;
4779 4779 }
  4780 +
  4781 + //如果活动一样,那么商品的活动就要清理成0
  4782 + var sh_can_cx=t_item.show_can_cx;
  4783 + if(sh_can_cx){
  4784 + for (let kh in sh_can_cx) {
  4785 + var cur=sh_can_cx[kh]?sh_can_cx[kh].cur_act:null;
  4786 + if(cur && cur.is_no_ok){
  4787 + //如果活动一样,那么商品的活动就要清理成0
  4788 + if(g_item.prom_type==cur.prom_type && g_item.prom_id==cur.prom_id){
  4789 + g_item.prom_type=0;
  4790 + }
  4791 + }
  4792 + }
  4793 + }
  4794 +
4780 4795 //--判断活动的类型--
4781 4796 switch (g_item.prom_type) {
4782 4797 case 1:
... ... @@ -4927,7 +4942,6 @@ Page({
4927 4942 zhlist.push(ite);
4928 4943  
4929 4944 }
4930   -
4931 4945 item.zhlist=zhlist;
4932 4946 }
4933 4947  
... ... @@ -5030,7 +5044,7 @@ Page({
5030 5044 // debugger
5031 5045 var str = JSON.stringify(pdata);
5032 5046 console.log(str,'aaaaaaaaaaaaaaa');
5033   - // return false;
  5047 + //return false;
5034 5048  
5035 5049 wx.showLoading({ title: "加载中" });
5036 5050 th.setData({ submit: 1, })
... ...