...
|
...
|
@@ -64,7 +64,7 @@ var discountNum = $('#mnum').val() - 0, |
|
|
|
|
|
var C_ID;
|
|
|
|
|
|
var sizeInfo = $('.size-info');
|
|
|
var sizeInfo;
|
|
|
|
|
|
require('../common');
|
|
|
|
...
|
...
|
@@ -97,6 +97,7 @@ function init() { |
|
|
curColorIndex = 0;
|
|
|
curSizeIndex = 0;
|
|
|
isEdit = 0;
|
|
|
sizeInfo = $('.size-info');
|
|
|
}
|
|
|
|
|
|
/*
|
...
|
...
|
@@ -372,7 +373,9 @@ function chosedLength() { |
|
|
var $chosedL = $('.block-list li.chosed'),
|
|
|
infoHtml,
|
|
|
choosedInfo = $('.choosed-info'),
|
|
|
notChoose = $('.not-choose');
|
|
|
notChoose = $('.not-choose'),
|
|
|
chosedStr = $chosedL.eq(0).html(),
|
|
|
strlen = 0;
|
|
|
|
|
|
choosedInfo.removeClass('hide');
|
|
|
|
...
|
...
|
@@ -380,13 +383,26 @@ function chosedLength() { |
|
|
notChoose.addClass('hide');
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i < chosedStr.length; i++) {
|
|
|
if (chosedStr.charCodeAt(i) > 255) {
|
|
|
strlen += 2;
|
|
|
} else {
|
|
|
strlen ++;
|
|
|
}
|
|
|
|
|
|
if (strlen >= 18) {
|
|
|
chosedStr = chosedStr.substring(0, i) + '...';
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if ($chosedL.length === 2) {
|
|
|
$chosedL.each(function(val) {
|
|
|
|
|
|
infoHtml = '已选:' + $chosedL.eq(0).html() + '、' + $chosedL.eq(1).html();
|
|
|
infoHtml = '已选:' + chosedStr + '、' + $chosedL.eq(1).html();
|
|
|
});
|
|
|
} else if ($chosedL.length === 1) {
|
|
|
infoHtml = '已选:' + $chosedL.eq(0).html();
|
|
|
infoHtml = '已选:' + chosedStr;
|
|
|
} else {
|
|
|
choosedInfo.addClass('hide');
|
|
|
notChoose.removeClass('hide');
|
...
|
...
|
|