...
|
...
|
@@ -68,6 +68,10 @@ function toggleAll(obj, roleType) { |
|
|
var $t = $(this);
|
|
|
var poolId = $t.data('pool-id');
|
|
|
|
|
|
if ($t.find('[data-role=cart-item-check]').is(':hidden')) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
if (poolId && parseInt($t.data('pool-type'), 10) === 3) { // 套餐
|
|
|
$t.closest('.promotion-pool').find('li[data-pool-id="' + poolId + '"]').each(function() {
|
|
|
if (!$(this).data('id')) {
|
...
|
...
|
@@ -174,7 +178,7 @@ Cart = { |
|
|
var $item = $this.closest('li[data-role="pitem"]');
|
|
|
var selectArray = [];
|
|
|
var content = '<div><i class="iconfont"></i>删除商品</div><p>确定要从购物车中删除该商品?</p>';
|
|
|
var countJSON;
|
|
|
var countJSON = [];
|
|
|
var poolId = $item.data('pool-id');
|
|
|
|
|
|
// 套餐删除
|
...
|
...
|
@@ -199,19 +203,19 @@ Cart = { |
|
|
});
|
|
|
|
|
|
if (!$this.data('gift') && !$item.hasClass('tr-disabled')) {
|
|
|
countJSON = {
|
|
|
countJSON.push({
|
|
|
productPrice: $item.find('.product-price').text(),
|
|
|
productTitle: $item.find('.pay-pro-info a').text(),
|
|
|
link: $item.find('.pay-pro-info a').attr('href'),
|
|
|
productNum: $item.data('productnum'),
|
|
|
productSku: $item.data('id'),
|
|
|
promotionId: $item.data('promotionid')
|
|
|
};
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
new RConfirm(content, function() {
|
|
|
capi.cartItemDel(selectArray, true, countJSON ? [countJSON] : '');
|
|
|
capi.cartItemDel(selectArray, true, countJSON);
|
|
|
});
|
|
|
},
|
|
|
delAll: function() {
|
...
|
...
|
@@ -226,7 +230,7 @@ Cart = { |
|
|
var $item = $chk.closest('[data-role=pitem]');
|
|
|
var poolId = $item.data('pool-id');
|
|
|
|
|
|
if (!$chk.hasClass('cart-item-checked')) {
|
|
|
if (!$chk.hasClass('cart-item-checked') || $chk.is(':hidden')) {
|
|
|
return true;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -282,6 +286,10 @@ Cart = { |
|
|
var $item = $(this);
|
|
|
var poolId = $item.data('pool-id');
|
|
|
|
|
|
if ($item.find('[data-role=cart-item-check]').is(':hidden')) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
if (poolId && parseInt($item.data('pool-type'), 10) === 3) {
|
|
|
|
|
|
$item.closest('.promotion-pool').find('li[data-pool-id="' + poolId + '"]').each(function() {
|
...
|
...
|
|