...
|
...
|
@@ -411,14 +411,14 @@ Cart = { |
|
|
filterSet.push({
|
|
|
proId: res.id,
|
|
|
color: color.color,
|
|
|
active: color.cur,
|
|
|
active: color.color === defaultColor ? true : false ,
|
|
|
sizes: color.sizes,
|
|
|
pic: color.thumbs[0],
|
|
|
selectable: color.total > 0,
|
|
|
colorName: color.name,
|
|
|
rgb: color.rgb
|
|
|
});
|
|
|
if (color.color === defaultColor && color.cur) {
|
|
|
|
|
|
if (color.color === defaultColor) {
|
|
|
defaultImg = color.thumbs[0];
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -496,18 +496,18 @@ Cart = { |
|
|
editTarget.find('.size-item').click(function() {
|
|
|
var $this = $(this);
|
|
|
|
|
|
if ($this.hasClass('current')) {
|
|
|
if ($this.hasClass('active') || $this.hasClass('disabled')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$(this).addClass('current').siblings('.current').removeClass('current');
|
|
|
$(this).addClass('active').siblings('.active').removeClass('active');
|
|
|
newProductSku = $(this).attr('data-sku');
|
|
|
});
|
|
|
|
|
|
// 初始化size list选中项(其他颜色中第一个尺码)
|
|
|
editTarget.find('.sizes-list.mb10').each(function() {
|
|
|
if ($(this).find('.current').length === 0) {
|
|
|
$(this).find('.size-item').first().addClass('current');
|
|
|
if ($(this).find('.active').length === 0) {
|
|
|
$(this).find('.size-item').first().addClass('active');
|
|
|
}
|
|
|
});
|
|
|
},
|
...
|
...
|
|