Commit 173d3b0ac31dc1176a21ce83d6760fdbb4d1c173
1 parent
5643f3d2
优惠促销,搭配促销在计算时候的优化
Showing
1 changed file
with
6 additions
and
3 deletions
packageE/pages/cart/cart2/cart2.js
| ... | ... | @@ -1739,6 +1739,9 @@ Page({ |
| 1739 | 1739 | //-- 循环处理 -- |
| 1740 | 1740 | for (var i in c_arr) { |
| 1741 | 1741 | var cart_item = c_arr[i]; //就是每一单的意思 |
| 1742 | + //--优惠多少钱-- | |
| 1743 | + cart_item.cut_price = 0; | |
| 1744 | + | |
| 1742 | 1745 | var pickid = cart_item.pickup_id; |
| 1743 | 1746 | var ord_goods = c_arr[i].goods; //就是每一单的从表的意思 |
| 1744 | 1747 | var o_price = 0, q_conditin = 0; |
| ... | ... | @@ -1898,8 +1901,7 @@ Page({ |
| 1898 | 1901 | } |
| 1899 | 1902 | |
| 1900 | 1903 | |
| 1901 | - //--优惠多少钱-- | |
| 1902 | - if (!cart_item.cut_price) cart_item.cut_price = 0; | |
| 1904 | + | |
| 1903 | 1905 | //-- -- |
| 1904 | 1906 | if (item_map.price != undefined && item_map.price != null |
| 1905 | 1907 | && item_map.prom_price != undefined && item_map.prom_price != null) |
| ... | ... | @@ -5993,7 +5995,8 @@ Page({ |
| 5993 | 5995 | bn_coll.clear_sele(); |
| 5994 | 5996 | this.setData({ collocation_goods: [] }); |
| 5995 | 5997 | //让主商品的活动变成5,搭配购 |
| 5996 | - this.setData({ 'bn_goods.prom_type': 0, 'bn_goods.prom_id': 0 }); | |
| 5998 | + if(this.data.bn_goods==5) | |
| 5999 | + this.setData({ 'bn_goods.prom_type': 0, 'bn_goods.prom_id': 0 }); | |
| 5997 | 6000 | } |
| 5998 | 6001 | |
| 5999 | 6002 | this.debounce(this.setexptype.bind(this, e), 400)(); | ... | ... |