Authored by 梁志锋

gulp ge文件提交

@@ -595,7 +595,7 @@ if ($('.brand-search-page').length) { @@ -595,7 +595,7 @@ if ($('.brand-search-page').length) {
595 if ($keyword.val().length) { 595 if ($keyword.val().length) {
596 $icon.css('color', '#000'); 596 $icon.css('color', '#000');
597 $(this).closest('.search-box').css('width', '11.25rem'); 597 $(this).closest('.search-box').css('width', '11.25rem');
598 - $searchAction.show(); 598 + $searchAction.show().find('.clear-text').show();
599 } else { 599 } else {
600 $icon.css('color', '#b2b2b2'); 600 $icon.css('color', '#b2b2b2');
601 $(this).closest('.search-box').css('width', '12.5rem'); 601 $(this).closest('.search-box').css('width', '12.5rem');
@@ -607,7 +607,7 @@ if ($('.brand-search-page').length) { @@ -607,7 +607,7 @@ if ($('.brand-search-page').length) {
607 // 2016.1.13 产品(高扬)要求进入页面默认显示取消按钮 607 // 2016.1.13 产品(高扬)要求进入页面默认显示取消按钮
608 $icon.css('color', '#000'); 608 $icon.css('color', '#000');
609 $keyword.closest('.search-box').css('width', '11.25rem'); 609 $keyword.closest('.search-box').css('width', '11.25rem');
610 - $searchAction.show(); 610 + $searchAction.show().find('.clear-text').hide();
611 611
612 clearTextHammer = new Hammer($('.clear-text')[0]); 612 clearTextHammer = new Hammer($('.clear-text')[0]);
613 clearTextHammer.on('tap', function(e) { 613 clearTextHammer.on('tap', function(e) {
@@ -5517,10 +5517,22 @@ function displayGoodNum(curGoodNum) { @@ -5517,10 +5517,22 @@ function displayGoodNum(curGoodNum) {
5517 } 5517 }
5518 5518
5519 //老的选中尺码去掉勾选,新的选中尺码加上勾选 5519 //老的选中尺码去掉勾选,新的选中尺码加上勾选
5520 -function changeSizeChosed(oldSizeIndex) { 5520 +function changeSizeChosed(newSizeIndex) {
  5521 + var sizes,
  5522 + queryString,
  5523 + i;
  5524 +
5521 if (curColorIndex && $curSizeBlock && $curSizeBlock.length > 0) { 5525 if (curColorIndex && $curSizeBlock && $curSizeBlock.length > 0) {
5522 $curSizeBlock.removeClass('chosed'); 5526 $curSizeBlock.removeClass('chosed');
5523 - $curSizeBlock = $($sizeRowList.eq(oldSizeIndex).children().get(curColorIndex - 1)); 5527 + sizes = $sizeRowList.eq(newSizeIndex).children();
  5528 + for (i = 0; i < sizes.length; i++) {
  5529 + if ($(sizes[i]).data('name') === $curSizeBlock.data('name')) {
  5530 + $curSizeBlock = $(sizes[i]);
  5531 + queryString = '#' + $curSizeBlock.data('name');
  5532 + curColorIndex = $(queryString).data('index');
  5533 + }
  5534 + }
  5535 +
5524 $curSizeBlock.addClass('chosed'); 5536 $curSizeBlock.addClass('chosed');
5525 return $curSizeBlock.data('num'); 5537 return $curSizeBlock.data('num');
5526 } 5538 }
@@ -5528,10 +5540,10 @@ function changeSizeChosed(oldSizeIndex) { @@ -5528,10 +5540,10 @@ function changeSizeChosed(oldSizeIndex) {
5528 } 5540 }
5529 5541
5530 //老的选中颜色去掉勾选,新的选中颜色加上勾选 5542 //老的选中颜色去掉勾选,新的选中颜色加上勾选
5531 -function changeColorChosed(oldColorIndex) { 5543 +function changeColorChosed(newColorIndex) {
5532 if (curSizeIndex && $curColorBlock && $curColorBlock.length > 0) { 5544 if (curSizeIndex && $curColorBlock && $curColorBlock.length > 0) {
5533 $curColorBlock.removeClass('chosed'); 5545 $curColorBlock.removeClass('chosed');
5534 - $curColorBlock = $($colorRowList.eq(oldColorIndex).children().get(curSizeIndex - 1)); 5546 + $curColorBlock = $($colorRowList.eq(newColorIndex).children().get(curSizeIndex - 1));
5535 $curColorBlock.addClass('chosed'); 5547 $curColorBlock.addClass('chosed');
5536 return $curColorBlock.data('num'); 5548 return $curColorBlock.data('num');
5537 } 5549 }
@@ -5579,15 +5591,15 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -5579,15 +5591,15 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
5579 } else { 5591 } else {
5580 hasChooseColor = true; 5592 hasChooseColor = true;
5581 5593
  5594 + // 尺码行当前行隐藏
  5595 + $sizeRowList.eq(curSizeIndex).addClass('hide');
  5596 +
5582 //老的选中尺码去掉勾选,新的选中尺码加上勾选 5597 //老的选中尺码去掉勾选,新的选中尺码加上勾选
5583 curGoodNum = changeSizeChosed(index + 1); 5598 curGoodNum = changeSizeChosed(index + 1);
5584 5599
5585 // 显示剩余数量 5600 // 显示剩余数量
5586 displayGoodNum(curGoodNum); 5601 displayGoodNum(curGoodNum);
5587 5602
5588 - // 尺码行当前行隐藏  
5589 - $sizeRowList.eq(curSizeIndex).addClass('hide');  
5590 -  
5591 //尺码对应行显示 5603 //尺码对应行显示
5592 $sizeRowList.eq(index + 1).removeClass('hide'); 5604 $sizeRowList.eq(index + 1).removeClass('hide');
5593 5605
@@ -5607,7 +5619,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -5607,7 +5619,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
5607 updateConformButtonClassAndText(); 5619 updateConformButtonClassAndText();
5608 }).on('touchstart', '.size-list .block', function() { 5620 }).on('touchstart', '.size-list .block', function() {
5609 var $this = $(this), 5621 var $this = $(this),
5610 - index = $this.index(), 5622 + index,
5611 curGoodNum; 5623 curGoodNum;
5612 5624
5613 // 当前尺码已经是选中状态,再点击时 5625 // 当前尺码已经是选中状态,再点击时
@@ -5619,10 +5631,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -5619,10 +5631,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
5619 hasChooseSize = false; 5631 hasChooseSize = false;
5620 5632
5621 //当前颜色行隐藏 5633 //当前颜色行隐藏
5622 - $colorRowList.eq(curColorIndex).removeClass('show').addClass('hide'); 5634 + $colorRowList.eq(curColorIndex).addClass('hide');
5623 5635
5624 //目标颜色行显示 5636 //目标颜色行显示
5625 - $colorRowList.eq(0).removeClass('hide').addClass('show'); 5637 + $colorRowList.eq(0).removeClass('hide');
5626 5638
5627 curColorIndex = 0; 5639 curColorIndex = 0;
5628 5640
@@ -5633,17 +5645,19 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -5633,17 +5645,19 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
5633 } else { 5645 } else {
5634 hasChooseSize = true; 5646 hasChooseSize = true;
5635 5647
  5648 + index = $('#' + $this.data('name')).data('index') - 1;
  5649 +
  5650 + // 颜色当前行隐藏
  5651 + $colorRowList.eq(curColorIndex).addClass('hide');
  5652 +
5636 //老的选中颜色去掉勾选,新的选中颜色加上勾选 5653 //老的选中颜色去掉勾选,新的选中颜色加上勾选
5637 curGoodNum = changeColorChosed(index + 1); 5654 curGoodNum = changeColorChosed(index + 1);
5638 5655
5639 // 显示剩余数量 5656 // 显示剩余数量
5640 displayGoodNum(curGoodNum); 5657 displayGoodNum(curGoodNum);
5641 5658
5642 - // 颜色当前行隐藏  
5643 - $colorRowList.eq(curColorIndex).removeClass('show').addClass('hide');  
5644 -  
5645 //颜色对应行显示 5659 //颜色对应行显示
5646 - $colorRowList.eq(index + 1).removeClass('hide').addClass('show'); 5660 + $colorRowList.eq(index + 1).removeClass('hide');
5647 5661
5648 curColorIndex = index + 1; 5662 curColorIndex = index + 1;
5649 $curSizeBlock = $this; 5663 $curSizeBlock = $this;
This diff could not be displayed because it is too large.