Showing
1 changed file
with
4 additions
and
1 deletions
@@ -36,13 +36,15 @@ function GoodInfo(properties) { | @@ -36,13 +36,15 @@ function GoodInfo(properties) { | ||
36 | this.buy_number = properties.buy_number; | 36 | this.buy_number = properties.buy_number; |
37 | this.product_sku = properties.product_sku; | 37 | this.product_sku = properties.product_sku; |
38 | this.selected = properties.selected; | 38 | this.selected = properties.selected; |
39 | + this.hasPromotion = properties.hasPromotion; | ||
39 | } | 40 | } |
40 | 41 | ||
41 | //TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods | 42 | //TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods |
42 | $('.cart-goods').on('touchstart', '.checkbox', function() { | 43 | $('.cart-goods').on('touchstart', '.checkbox', function() { |
43 | var $this = $(this), | 44 | var $this = $(this), |
44 | $good = $this.closest('.shopping-cart-good'), | 45 | $good = $this.closest('.shopping-cart-good'), |
45 | - id = $good.data('id'); | 46 | + id = $good.data('id'), |
47 | + promotion = $good.data('promotion'); | ||
46 | 48 | ||
47 | var goodsList = [], | 49 | var goodsList = [], |
48 | goodInfo = {}; | 50 | goodInfo = {}; |
@@ -55,6 +57,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | @@ -55,6 +57,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | ||
55 | goodInfo.goods_type = $('#cartType').val(); | 57 | goodInfo.goods_type = $('#cartType').val(); |
56 | goodInfo.selected = $this.hasClass('icon-cb-checked') ? 'N' : 'Y'; | 58 | goodInfo.selected = $this.hasClass('icon-cb-checked') ? 'N' : 'Y'; |
57 | goodInfo.product_sku = id; | 59 | goodInfo.product_sku = id; |
60 | + goodInfo.hasPromotion = promotion; | ||
58 | goodInfo.buy_number = $good.find('.count').eq(0).text().trim().replace('×', ''); | 61 | goodInfo.buy_number = $good.find('.count').eq(0).text().trim().replace('×', ''); |
59 | goodsList.push(new GoodInfo(goodInfo)); | 62 | goodsList.push(new GoodInfo(goodInfo)); |
60 | 63 |
-
Please register or login to post a comment