...
|
...
|
@@ -117,7 +117,6 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { |
|
|
$('.num-tag').html(numInCart + buyNumber);
|
|
|
$('.num-tag').removeClass('hide');
|
|
|
confirming = false;
|
|
|
tip.show('选择成功');
|
|
|
remove();
|
|
|
}
|
|
|
}).fail(function() {
|
...
|
...
|
@@ -148,21 +147,14 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { |
|
|
}
|
|
|
|
|
|
if ($chosed.length === 0) {
|
|
|
$colorList.each(function() {
|
|
|
$this.closest('ul>li').each(function() {
|
|
|
$(this).removeClass('zero-stock');
|
|
|
if (0 === $(this).data('num') - 0) {
|
|
|
$(this).addClass('zero-stock');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$sizeList.each(function() {
|
|
|
colorIndex = $(this).data('colorid');
|
|
|
if (colorIndex === firstColorId) {
|
|
|
$(this).removeClass('hide');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$sizeList.not('.hide').each(function() {
|
|
|
$siblingBlock.find('ul>li').each(function() {
|
|
|
$(this).removeClass('zero-stock');
|
|
|
if (0 === $(this).data('num') - 0) {
|
|
|
$(this).addClass('zero-stock');
|
...
|
...
|
@@ -186,7 +178,7 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { |
|
|
$siblingBlock.find('.block').removeClass('zero-stock');
|
|
|
for (i = 0; i < numArray.length; i++) {
|
|
|
if (0 === numArray[i] - 0) {
|
|
|
$siblingBlock.find('.block').not('.hide').eq(i).addClass('zero-stock');
|
|
|
$siblingBlock.find('.block').eq(i).addClass('zero-stock');
|
|
|
}
|
|
|
}
|
|
|
} else if ($chosed.length === 1 && !$this.hasClass('chosed')) {
|
...
|
...
|
@@ -207,7 +199,7 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { |
|
|
$siblingBlock.find('.block').eq(i).addClass('zero-stock');
|
|
|
}
|
|
|
}
|
|
|
numArray = ($siblingBlock.find('.chosed').data('numstr') + '').split('/');
|
|
|
numArray = $siblingBlock.find('.chosed').data('numstr').split('/');
|
|
|
$that.find('.num .left-num').html('剩余' + numArray[index] + '件');
|
|
|
if (2 === $chosed.closest('.zero-stock').length) {
|
|
|
$('#chose-btn-sure').css('background-color', '#c0c0c0');
|
...
|
...
|
|