...
|
...
|
@@ -639,17 +639,32 @@ function countAJAX(data) { |
|
|
});
|
|
|
}
|
|
|
|
|
|
$('.minus').each(function() {
|
|
|
var data = $(this).data();
|
|
|
|
|
|
$(this).data(data);
|
|
|
});
|
|
|
|
|
|
$payWapper.on('click', '.minus, .plus', function() {
|
|
|
var $this = $(this),
|
|
|
minNum = 1;
|
|
|
|
|
|
countJSON = {};
|
|
|
count = $(this).hasClass('minus') ? 'decreaseNum' : 'increaseNum';
|
|
|
count = 'increaseNum';
|
|
|
|
|
|
if ($this.hasClass('minus')) {
|
|
|
count = 'decreaseNum';
|
|
|
minNum = $this.data('min') ? $this.data('min') * 1 : 1;
|
|
|
}
|
|
|
|
|
|
countJSON['' + count] = 1;
|
|
|
if (countBusy || ($(this).siblings('input').val() === '1' && $(this).hasClass('minus'))) {
|
|
|
if (countBusy || ($this.hasClass('minus') && $this.siblings('input').val() * 1 <= minNum)) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
countAJAX($.extend(countJSON,
|
|
|
{
|
|
|
sku: $(this).parents('tr').data('id')
|
|
|
sku: $this.parents('tr').data('id')
|
|
|
}
|
|
|
));
|
|
|
});
|
...
|
...
|
|