...
|
...
|
@@ -8273,6 +8273,8 @@ var limitProductCode, |
|
|
// 限购商品的skn。只有限购商品时才会设置。
|
|
|
skn;
|
|
|
|
|
|
var $sizeInfo;
|
|
|
|
|
|
//禁用数字编辑
|
|
|
function disableNumEdit() {
|
|
|
var $numBtn = $('.chose-panel').find('.num .btn>.iconfont');
|
...
|
...
|
@@ -8302,6 +8304,7 @@ function init() { |
|
|
isEdit = 0;
|
|
|
$mnum = $('#mnum');
|
|
|
discountNum = $mnum.val() - 0;
|
|
|
$sizeInfo = $('.size-info');
|
|
|
}
|
|
|
|
|
|
/*
|
...
|
...
|
@@ -8555,6 +8558,33 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) { |
|
|
return false;
|
|
|
});
|
|
|
|
|
|
function chosedLength() {
|
|
|
var $chosedL = $('.block-list li.chosed'),
|
|
|
infoHtml,
|
|
|
choosedInfo = $('.choosed-info'),
|
|
|
notChoose = $('.not-choose');
|
|
|
|
|
|
choosedInfo.removeClass('hide');
|
|
|
|
|
|
if (!notChoose.hasClass('hide')) {
|
|
|
notChoose.addClass('hide');
|
|
|
}
|
|
|
|
|
|
if ($chosedL.length === 2) {
|
|
|
$chosedL.each(function(val) {
|
|
|
|
|
|
infoHtml = '已选:' + $chosedL.eq(0).html() + '、' + $chosedL.eq(1).html();
|
|
|
})
|
|
|
} else if ($chosedL.length === 1) {
|
|
|
infoHtml = '已选:' + $chosedL.eq(0).html();
|
|
|
} else {
|
|
|
choosedInfo.addClass('hide');
|
|
|
notChoose.removeClass('hide');
|
|
|
}
|
|
|
|
|
|
choosedInfo.html(infoHtml);
|
|
|
}
|
|
|
|
|
|
$yohoPage.on('touchstart', '.color-list .block', function() {
|
|
|
var $this = $(this),
|
|
|
index = $this.index(),
|
...
|
...
|
@@ -8635,6 +8665,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() { |
|
|
return false;
|
|
|
}
|
|
|
|
|
|
chosedLength();
|
|
|
|
|
|
}).on('touchstart', '.size-list .block', function() {
|
|
|
var $this = $(this),
|
...
|
...
|
@@ -8660,6 +8691,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() { |
|
|
//老的选中颜色去掉勾选,新的选中颜色加上勾选
|
|
|
changeColorChosed(0);
|
|
|
|
|
|
if (!$sizeInfo.hasClass('hide')) {
|
|
|
$sizeInfo.addClass('hide');
|
|
|
}
|
|
|
|
|
|
// 当前尺码不是选中状态,选中时
|
|
|
} else {
|
|
|
hasChooseSize = true;
|
...
|
...
|
@@ -8680,6 +8715,9 @@ $yohoPage.on('touchstart', '.color-list .block', function() { |
|
|
|
|
|
curColorIndex = index + 1;
|
|
|
$curSizeBlock = $this;
|
|
|
// $('.size-info').removeClass('hide');
|
|
|
|
|
|
$sizeInfo.html($(this).data('info')).removeClass('hide');
|
|
|
}
|
|
|
|
|
|
// 颜色块切换勾选样式
|
...
|
...
|
@@ -8692,6 +8730,8 @@ $yohoPage.on('touchstart', '.color-list .block', function() { |
|
|
$('#good-num').val(1);
|
|
|
}
|
|
|
|
|
|
chosedLength();
|
|
|
|
|
|
// 设置按钮的样式和文字
|
|
|
updateConformButtonClassAndText();
|
|
|
});
|
...
|
...
|
@@ -8904,6 +8944,18 @@ $yohoPage.on('touchstart', '.btn-minus', function() { |
|
|
|
|
|
});
|
|
|
|
|
|
$yohoPage.on('click', '.close', function() {
|
|
|
hide();
|
|
|
});
|
|
|
|
|
|
$yohoPage.on('touchstart', '.thumb', function() {
|
|
|
if ($(this).hasClass('hover')) {
|
|
|
$(this).removeClass('hover');
|
|
|
} else {
|
|
|
$(this).addClass('hover');
|
|
|
}
|
|
|
})
|
|
|
|
|
|
exports.init = init;
|
|
|
exports.show = show;
|
|
|
exports.remove = removePannel;
|
...
|
...
|
|