Authored by ZhongW

设置封面图

... ... @@ -75,7 +75,9 @@ var jQuery = require('jquery');
Array.push(itemsUpdate[i]._index);
}
for(var i=0; i<Array.length; i++){
sortArray.push(dataArray[Array[i]]);
if(dataArray[Array[i]]){
sortArray.push(dataArray[Array[i]]);
}
}
if(callBack){
callBack(sortArray);
... ...
... ... @@ -279,16 +279,6 @@ function renderGoodList() {
"男": 1,
"女": 2
};
goodsList.forEach(function (item, index) {
if (item && item.goodsImagesList) {
console.log((item.goodsImagesList));
for (var i = 0; i < item.goodsImagesList.length; i++) {
if (!item.goodsImagesList[i]) {
item.goodsImagesList.splice(i, 1);
}
}
}
});
var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3;
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
goodsList: goodsList,
... ... @@ -419,25 +409,21 @@ $('#fenmianWrap').on("click", ".btn-metro", function () {
var colorIndex = $(this).data("i");
if (colorIndex == 0) {
list.forEach(function (item, index) {
if(item){
if (index == index1) {
item.isDefault = "Y";
item.genderCover = 0;
} else {
item.isDefault = "N";
}
if (index == index1) {
item.isDefault = "Y";
item.genderCover = 0;
} else {
item.isDefault = "N";
}
});
}else {
list.forEach(function (item, index) {
if(item){
if (index == index1) {
item.genderCover = colorIndex;
item.isDefault = "N";
} else {
if(item.genderCover==colorIndex){
item.genderCover = 0;
}
if (index == index1) {
item.genderCover = colorIndex;
item.isDefault = "N";
} else {
if(item.genderCover==colorIndex){
item.genderCover = 0;
}
}
});
... ...