Authored by ZhongW

封面图片拖拽问题

... ... @@ -77,7 +77,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);
... ...
... ... @@ -318,16 +318,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,
... ... @@ -436,24 +426,20 @@ $('#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 {
item.genderCover = 0;
}
if (index == index1) {
item.genderCover = colorIndex;
item.isDefault = "N";
} else {
item.genderCover = 0;
}
});
// item.genderCover = colorIndex;
... ...