Authored by htoooth

Merge branch 'feature/new-product-detail' into release/5.3.1

... ... @@ -381,7 +381,7 @@ bindEvent.add(function() {
// 是否能:量贩购买,量贩小于库存才能购买
function canBundleBuy() {
return goodsBaseNum < maxStock;
return goodsBaseNum <= maxStock;
}
// 重置Num显示为最小购买数
... ... @@ -462,14 +462,11 @@ bindEvent.add(function() {
// 尺码选中的状态
if (maxStock !== -1) {
console.log(maxStock);
if (canBundleBuy()) {
console.log(1);
$itemBuy.removeClass('hide');
$soldOut.addClass('hide');
cartEvent.emit('gocart');
cartEvent.emit('selling');
} else {
console.log(2);
$itemBuy.addClass('hide');
$soldOut.removeClass('hide');
cartEvent.emit('sellout');
... ... @@ -489,12 +486,7 @@ bindEvent.add(function() {
// 包括默认的-1情况下
$itemBuy.removeClass('hide');
$soldOut.addClass('hide');
if (maxStock === -1) {
cartEvent.emit('selling');
} else {
cartEvent.emit('gocart');
}
cartEvent.emit('selling');
}
}
... ... @@ -833,7 +825,9 @@ bindEvent.add(function() {
PRD_SKU: getSku()
});
addCart();
addCart().then(function() {
cartEvent.emit('gocart');
});
});
// 收藏
... ... @@ -999,9 +993,10 @@ bindEvent.add(function() {
}
if (hasOnlyOneSize) {
$maxColor = $('.colors .focus').eq(0);
$sizes.eq($('.colors .focus').index()).find('li').click();
}
$maxColor = $('.colors .focus').eq(0);
}());
yasAtHead.yasHead();
... ... @@ -1187,8 +1182,6 @@ function loadComment() {
});
// 评论类型的切换
$('.comments').on('click', '.comment-tabs h2[data-comment-type]', function() {
... ... @@ -1873,10 +1866,7 @@ $('.shoppingCar-btn').on('click', function() {
}
if ($this.data('gocart') === 1) {
addCart().then(function() {
window.jumpUrl($('#go-to-cart-url').attr('href'));
});
window.jumpUrl($('#go-to-cart-url').attr('href'));
return;
}
... ...
... ... @@ -2325,7 +2325,6 @@
.title {
display: inline-block;
font-weight: bold;
cursor: pointer;
font-size: 14px;
margin-left: auto;
margin-right: auto;
... ...