Authored by ZhongW

封面图片拖拽问题

@@ -77,8 +77,10 @@ var jQuery = require('jquery'); @@ -77,8 +77,10 @@ var jQuery = require('jquery');
77 Array.push(itemsUpdate[i]._index); 77 Array.push(itemsUpdate[i]._index);
78 } 78 }
79 for (var i = 0; i < Array.length; i++) { 79 for (var i = 0; i < Array.length; i++) {
  80 + if(dataArray[Array[i]]){
80 sortArray.push(dataArray[Array[i]]); 81 sortArray.push(dataArray[Array[i]]);
81 } 82 }
  83 + }
82 if (callBack) { 84 if (callBack) {
83 callBack(sortArray); 85 callBack(sortArray);
84 } 86 }
@@ -318,16 +318,6 @@ function renderGoodList() { @@ -318,16 +318,6 @@ function renderGoodList() {
318 "男": 1, 318 "男": 1,
319 "女": 2 319 "女": 2
320 }; 320 };
321 - goodsList.forEach(function (item, index) {  
322 - if (item && item.goodsImagesList) {  
323 - console.log((item.goodsImagesList));  
324 - for (var i = 0; i < item.goodsImagesList.length; i++) {  
325 - if (!item.goodsImagesList[i]) {  
326 - item.goodsImagesList.splice(i, 1);  
327 - }  
328 - }  
329 - }  
330 - });  
331 var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3; 321 var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3;
332 $("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), { 322 $("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
333 goodsList: goodsList, 323 goodsList: goodsList,
@@ -436,25 +426,21 @@ $('#fenmianWrap').on("click", ".btn-metro", function () { @@ -436,25 +426,21 @@ $('#fenmianWrap').on("click", ".btn-metro", function () {
436 var colorIndex = $(this).data("i"); 426 var colorIndex = $(this).data("i");
437 if (colorIndex == 0) { 427 if (colorIndex == 0) {
438 list.forEach(function (item, index) { 428 list.forEach(function (item, index) {
439 - if(item){  
440 if (index == index1) { 429 if (index == index1) {
441 item.isDefault = "Y"; 430 item.isDefault = "Y";
442 item.genderCover = 0; 431 item.genderCover = 0;
443 } else { 432 } else {
444 item.isDefault = "N"; 433 item.isDefault = "N";
445 } 434 }
446 - }  
447 }); 435 });
448 } else { 436 } else {
449 list.forEach(function (item, index) { 437 list.forEach(function (item, index) {
450 - if(item){  
451 if (index == index1) { 438 if (index == index1) {
452 item.genderCover = colorIndex; 439 item.genderCover = colorIndex;
453 item.isDefault = "N"; 440 item.isDefault = "N";
454 } else { 441 } else {
455 item.genderCover = 0; 442 item.genderCover = 0;
456 } 443 }
457 - }  
458 }); 444 });
459 // item.genderCover = colorIndex; 445 // item.genderCover = colorIndex;
460 } 446 }