Authored by zhangxiaoru

gulp ge

@@ -8273,6 +8273,8 @@ var limitProductCode, @@ -8273,6 +8273,8 @@ var limitProductCode,
8273 // 限购商品的skn。只有限购商品时才会设置。 8273 // 限购商品的skn。只有限购商品时才会设置。
8274 skn; 8274 skn;
8275 8275
  8276 +var $sizeInfo;
  8277 +
8276 //禁用数字编辑 8278 //禁用数字编辑
8277 function disableNumEdit() { 8279 function disableNumEdit() {
8278 var $numBtn = $('.chose-panel').find('.num .btn>.iconfont'); 8280 var $numBtn = $('.chose-panel').find('.num .btn>.iconfont');
@@ -8302,6 +8304,7 @@ function init() { @@ -8302,6 +8304,7 @@ function init() {
8302 isEdit = 0; 8304 isEdit = 0;
8303 $mnum = $('#mnum'); 8305 $mnum = $('#mnum');
8304 discountNum = $mnum.val() - 0; 8306 discountNum = $mnum.val() - 0;
  8307 + $sizeInfo = $('.size-info');
8305 } 8308 }
8306 8309
8307 /* 8310 /*
@@ -8555,6 +8558,33 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) { @@ -8555,6 +8558,33 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) {
8555 return false; 8558 return false;
8556 }); 8559 });
8557 8560
  8561 +function chosedLength() {
  8562 + var $chosedL = $('.block-list li.chosed'),
  8563 + infoHtml,
  8564 + choosedInfo = $('.choosed-info'),
  8565 + notChoose = $('.not-choose');
  8566 +
  8567 + choosedInfo.removeClass('hide');
  8568 +
  8569 + if (!notChoose.hasClass('hide')) {
  8570 + notChoose.addClass('hide');
  8571 + }
  8572 +
  8573 + if ($chosedL.length === 2) {
  8574 + $chosedL.each(function(val) {
  8575 +
  8576 + infoHtml = '已选:' + $chosedL.eq(0).html() + '、' + $chosedL.eq(1).html();
  8577 + })
  8578 + } else if ($chosedL.length === 1) {
  8579 + infoHtml = '已选:' + $chosedL.eq(0).html();
  8580 + } else {
  8581 + choosedInfo.addClass('hide');
  8582 + notChoose.removeClass('hide');
  8583 + }
  8584 +
  8585 + choosedInfo.html(infoHtml);
  8586 +}
  8587 +
8558 $yohoPage.on('touchstart', '.color-list .block', function() { 8588 $yohoPage.on('touchstart', '.color-list .block', function() {
8559 var $this = $(this), 8589 var $this = $(this),
8560 index = $this.index(), 8590 index = $this.index(),
@@ -8635,6 +8665,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -8635,6 +8665,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
8635 return false; 8665 return false;
8636 } 8666 }
8637 8667
  8668 + chosedLength();
8638 8669
8639 }).on('touchstart', '.size-list .block', function() { 8670 }).on('touchstart', '.size-list .block', function() {
8640 var $this = $(this), 8671 var $this = $(this),
@@ -8660,6 +8691,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -8660,6 +8691,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
8660 //老的选中颜色去掉勾选,新的选中颜色加上勾选 8691 //老的选中颜色去掉勾选,新的选中颜色加上勾选
8661 changeColorChosed(0); 8692 changeColorChosed(0);
8662 8693
  8694 + if (!$sizeInfo.hasClass('hide')) {
  8695 + $sizeInfo.addClass('hide');
  8696 + }
  8697 +
8663 // 当前尺码不是选中状态,选中时 8698 // 当前尺码不是选中状态,选中时
8664 } else { 8699 } else {
8665 hasChooseSize = true; 8700 hasChooseSize = true;
@@ -8680,6 +8715,9 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -8680,6 +8715,9 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
8680 8715
8681 curColorIndex = index + 1; 8716 curColorIndex = index + 1;
8682 $curSizeBlock = $this; 8717 $curSizeBlock = $this;
  8718 + // $('.size-info').removeClass('hide');
  8719 +
  8720 + $sizeInfo.html($(this).data('info')).removeClass('hide');
8683 } 8721 }
8684 8722
8685 // 颜色块切换勾选样式 8723 // 颜色块切换勾选样式
@@ -8692,6 +8730,8 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -8692,6 +8730,8 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
8692 $('#good-num').val(1); 8730 $('#good-num').val(1);
8693 } 8731 }
8694 8732
  8733 + chosedLength();
  8734 +
8695 // 设置按钮的样式和文字 8735 // 设置按钮的样式和文字
8696 updateConformButtonClassAndText(); 8736 updateConformButtonClassAndText();
8697 }); 8737 });
@@ -8904,6 +8944,18 @@ $yohoPage.on('touchstart', '.btn-minus', function() { @@ -8904,6 +8944,18 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
8904 8944
8905 }); 8945 });
8906 8946
  8947 +$yohoPage.on('click', '.close', function() {
  8948 + hide();
  8949 +});
  8950 +
  8951 +$yohoPage.on('touchstart', '.thumb', function() {
  8952 + if ($(this).hasClass('hover')) {
  8953 + $(this).removeClass('hover');
  8954 + } else {
  8955 + $(this).addClass('hover');
  8956 + }
  8957 +})
  8958 +
8907 exports.init = init; 8959 exports.init = init;
8908 exports.show = show; 8960 exports.show = show;
8909 exports.remove = removePannel; 8961 exports.remove = removePannel;
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.