|
@@ -27,6 +27,13 @@ $('.shopping-cart-good .name').each(function() { |
|
@@ -27,6 +27,13 @@ $('.shopping-cart-good .name').each(function() { |
27
|
this.mlellipsis(2);
|
27
|
this.mlellipsis(2);
|
28
|
});
|
28
|
});
|
29
|
|
29
|
|
|
|
30
|
+function GoodInfo(properties) {
|
|
|
31
|
+ this.goods_type = properties.goods_type;
|
|
|
32
|
+ this.buy_number = properties.buy_number;
|
|
|
33
|
+ this.product_sku = properties.product_sku;
|
|
|
34
|
+ this.selected = properties.selected;
|
|
|
35
|
+}
|
|
|
36
|
+
|
30
|
//TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods
|
37
|
//TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods
|
31
|
$('.cart-goods').on('touchstart', '.checkbox', function() {
|
38
|
$('.cart-goods').on('touchstart', '.checkbox', function() {
|
32
|
var $this = $(this),
|
39
|
var $this = $(this),
|
|
@@ -43,12 +50,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { |
|
@@ -43,12 +50,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { |
43
|
isSelected = false;
|
50
|
isSelected = false;
|
44
|
}
|
51
|
}
|
45
|
|
52
|
|
46
|
- function GoodInfo(properties) {
|
|
|
47
|
- this.goods_type = properties.goods_type;
|
|
|
48
|
- this.buy_number = properties.buy_number;
|
|
|
49
|
- this.product_sku = properties.product_sku;
|
|
|
50
|
- this.selected = properties.selected;
|
|
|
51
|
- }
|
53
|
+
|
52
|
|
54
|
|
53
|
goodInfo.goods_type = cartType;
|
55
|
goodInfo.goods_type = cartType;
|
54
|
goodInfo.selected = isSelected ? 'N' : 'Y';
|
56
|
goodInfo.selected = isSelected ? 'N' : 'Y';
|
|
@@ -174,17 +176,10 @@ function didUpdateAllGoodsCheckStatus() { |
|
@@ -174,17 +176,10 @@ function didUpdateAllGoodsCheckStatus() { |
174
|
}
|
176
|
}
|
175
|
|
177
|
|
176
|
function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
|
178
|
function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
|
177
|
- var goodInfo = {};
|
|
|
178
|
- var $goods = $('.cart-content:not(.hide) .shopping-cart-good');
|
|
|
179
|
- var $good = null;
|
|
|
180
|
- var goodsList = [];
|
|
|
181
|
-
|
|
|
182
|
- function GoodInfo(properties) {
|
|
|
183
|
- this.goods_type = properties.goods_type;
|
|
|
184
|
- this.buy_number = properties.buy_number;
|
|
|
185
|
- this.product_sku = properties.product_sku;
|
|
|
186
|
- this.selected = properties.selected;
|
|
|
187
|
- }
|
179
|
+ var goodInfo = {},
|
|
|
180
|
+ $goods = $('.cart-content:not(.hide) .shopping-cart-good'),
|
|
|
181
|
+ $good = null,
|
|
|
182
|
+ goodsList = [];
|
188
|
|
183
|
|
189
|
goodInfo.goods_type = type;
|
184
|
goodInfo.goods_type = type;
|
190
|
goodInfo.selected = isSelected ? 'N' : 'Y';
|
185
|
goodInfo.selected = isSelected ? 'N' : 'Y';
|