Commit 48281b9435095e8afba237280e0ae9e4eb6ba6a6

Authored by yvan.ni
1 parent 005f514d

购物车优化

packageE/pages/cart/cart2/cart2.js
... ... @@ -1383,6 +1383,9 @@ Page({
1383 1383 item1.is_act_last=1; //这个是要在前端显示按钮切换的
1384 1384 }
1385 1385  
  1386 + }else{
  1387 + item1.prom_id = arr[k].show_can_cx[key_o].cur_act.prom_id;
  1388 + item1.prom_type = arr[k].show_can_cx[key_o].cur_act.prom_type;
1386 1389 }
1387 1390 }
1388 1391 }
... ... @@ -8887,15 +8890,8 @@ Page({
8887 8890 })
8888 8891 //清空优惠促销的内容
8889 8892 this.data.prom_goods_map = {};
8890   - //-- 过滤掉赠品 --
8891   - let n_carr=[];
8892   - for (var i = 0; i < carr.length; i++) {
8893   - if (!carr[i].is_gift) {
8894   - n_carr.push(carr[i]);
8895   - }
8896   - }
8897 8893 //-- 重新计算一下价格 --
8898   - this.get_cart_next(n_carr);
  8894 + this.get_cart_next(null, 1, {prom_type: 0, prom_id: 0});
8899 8895 }
8900 8896  
8901 8897  
... ...