Authored by 梁志锋

修改颜色和尺码选

... ... @@ -137,8 +137,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
curSizeBlock,
curGoodNum;
var $siblingBlock = $this.closest('.block-list').siblings(':first');
$this.siblings('.chosed').removeClass('chosed');
index = $this.index();
... ... @@ -150,8 +148,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
$leftNum.val(0);
hasChooseColor = false;
//if (!hasChooseSize) {
//当前尺码行隐藏
$sizeRowList.eq(curSizeIndex).removeClass('show').addClass('hide');
... ... @@ -159,7 +155,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
$sizeRowList.eq(0).removeClass('hide').addClass('show');
curSizeIndex = 0;
//}
//如果尺码已经是选择状态
if (curColorIndex) {
... ... @@ -184,6 +179,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 之前选中的尺码去掉勾选样式,新尺码块勾选
if ($curSizeBlock && $curSizeBlock.length > 0) {
$curSizeBlock.removeClass('chosed');
//curSizeBlock = $sizeRowList.eq(curSizeIndex + 1).children().get(curColorIndex - 1);
curSizeBlock = $sizeRowList.eq(index + 1).children().get(curColorIndex - 1);
$curSizeBlock = $(curSizeBlock);
... ... @@ -233,8 +229,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
curColorBlock,
curGoodNum;
var $siblingBlock = $this.closest('.block-list').siblings(':first');
$this.siblings('.chosed').removeClass('chosed');
index = $this.index();
... ... @@ -246,8 +240,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
$leftNum.val(0);
hasChooseSize = false;
//if (!hasChooseColor) {
//当前颜色行隐藏
$colorRowList.eq(curColorIndex).removeClass('show').addClass('hide');
... ... @@ -255,7 +247,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
$colorRowList.eq(0).removeClass('hide').addClass('show');
curColorIndex = 0;
//}
//如果颜色已经是选择状态
if (curSizeIndex) {
... ... @@ -280,6 +271,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 之前选中的颜色去掉勾选样式,新颜色块勾选
if ($curColorBlock && $curColorBlock.length > 0) {
$curColorBlock.removeClass('chosed');
//curColorBlock = $colorRowList.eq(curColorIndex + 1).children().get(curSizeIndex - 1);
curColorBlock = $colorRowList.eq(index + 1).children().get(curSizeIndex - 1);
$curColorBlock = $(curColorBlock);
... ... @@ -294,7 +286,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
} else {
$allChoseItems.find('.num .left-num').html('剩余' + curGoodNum + '件');
}
$leftNum.val(curGoodNum);
//数量小于0
... ...