...
|
...
|
@@ -17,9 +17,6 @@ var $chosePanel = $('#chose-panel'), |
|
|
$num,
|
|
|
$chosed,
|
|
|
$imgsThumb,
|
|
|
|
|
|
// re = /\d+/,
|
|
|
|
|
|
$leftNum,
|
|
|
leftNum,
|
|
|
confirming,
|
...
|
...
|
@@ -31,6 +28,7 @@ var $chosePanel = $('#chose-panel'), |
|
|
$curSizeBlock,
|
|
|
$sizeRowList,
|
|
|
cbFn,
|
|
|
cartType,
|
|
|
$allChoseItems,
|
|
|
$yohoPage = $('.yoho-page');
|
|
|
|
...
|
...
|
@@ -41,10 +39,10 @@ function init() { |
|
|
hasChooseColor = false;
|
|
|
hasChooseSize = false;
|
|
|
$curSizeBlock = null;
|
|
|
$imgsThumb = $('.chose-panel').find('.thumb'),
|
|
|
$allChoseItems = $('.chose-items'),
|
|
|
$sizeRowList = $('.size-list ul'),
|
|
|
$leftNum = $('#left-num'),
|
|
|
$imgsThumb = $('.chose-panel').find('.thumb');
|
|
|
$allChoseItems = $('.chose-items');
|
|
|
$sizeRowList = $('.size-list ul');
|
|
|
$leftNum = $('#left-num');
|
|
|
$firstRow = $sizeRowList.eq(0);
|
|
|
$firstRow.toggleClass('hide');
|
|
|
$curSizeRow = $firstRow;
|
...
|
...
|
@@ -77,7 +75,7 @@ function show(html, cb) { |
|
|
//隐藏当前Panel
|
|
|
function hide() {
|
|
|
$('.chose-panel').hide();
|
|
|
cbFn = null;
|
|
|
//cbFn = null;
|
|
|
}
|
|
|
|
|
|
//修改加入购物车的文字和背景
|
...
|
...
|
@@ -168,7 +166,6 @@ $yohoPage.on('touchstart', '.color-list .block', function(e) { |
|
|
// 之前选中的尺码去掉勾选样式
|
|
|
if ($preSiblingBlock.length > 0) {
|
|
|
$preSiblingBlock.removeClass('chosed');
|
|
|
|
|
|
}
|
|
|
|
|
|
curSizeBlock = $curSizeRow.children().get(scindex);
|
...
|
...
|
@@ -328,7 +325,8 @@ $yohoPage.on('touchstart', '.btn-minus', function() { |
|
|
productSku: productSku,
|
|
|
buyNumber: buyNumber,
|
|
|
promotionId: promotionId,
|
|
|
isEdit: isEdit
|
|
|
isEdit: isEdit,
|
|
|
cartType: cartType
|
|
|
}
|
|
|
}).done(function(res) {
|
|
|
loading.hideLoadingMask();
|
...
|
...
|
@@ -338,7 +336,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() { |
|
|
hide();
|
|
|
|
|
|
if (cbFn) {
|
|
|
cbFn(res.location);
|
|
|
cbFn();
|
|
|
}
|
|
|
}
|
|
|
if (res.message) {
|
...
|
...
|
|