|
|
1
|
+
|
|
|
2
|
+
|
|
|
3
|
+
|
1
|
'use strict';
|
4
|
'use strict';
|
2
|
var $ = require('jquery'),
|
5
|
var $ = require('jquery'),
|
3
|
common = require('../../../../common/common');
|
6
|
common = require('../../../../common/common');
|
|
@@ -465,17 +468,18 @@ function getFenManData () { |
|
@@ -465,17 +468,18 @@ function getFenManData () { |
465
|
var map = {
|
468
|
var map = {
|
466
|
goodsImagesBoList: []
|
469
|
goodsImagesBoList: []
|
467
|
},
|
470
|
},
|
468
|
- errorMsg = '';
|
471
|
+ msg = '';
|
469
|
|
472
|
|
470
|
$.each(goodsList, function (index, item) {
|
473
|
$.each(goodsList, function (index, item) {
|
471
|
if (item.isDefault == "Y") {
|
474
|
if (item.isDefault == "Y") {
|
472
|
map.productSkc = item.productSkc;
|
475
|
map.productSkc = item.productSkc;
|
473
|
map.productSkn = item.productSkn;
|
476
|
map.productSkn = item.productSkn;
|
474
|
}
|
477
|
}
|
475
|
-
|
478
|
+ console.info(item.goodsImagesList)
|
476
|
if (!item.goodsImagesList || item.goodsImagesList == 0) {
|
479
|
if (!item.goodsImagesList || item.goodsImagesList == 0) {
|
477
|
- errorMsg += '<p>请设置skc:' + item.productSkc + '的封面</p>';
|
|
|
478
|
return;
|
480
|
return;
|
|
|
481
|
+ }else{
|
|
|
482
|
+ msg = 'pass';
|
479
|
}
|
483
|
}
|
480
|
$.each(item.goodsImagesList, function (_index, _item) {
|
484
|
$.each(item.goodsImagesList, function (_index, _item) {
|
481
|
if (!_item) {
|
485
|
if (!_item) {
|
|
@@ -487,12 +491,12 @@ function getFenManData () { |
|
@@ -487,12 +491,12 @@ function getFenManData () { |
487
|
});
|
491
|
});
|
488
|
//if (map.goodsImagesBoList.length == 0) return;
|
492
|
//if (map.goodsImagesBoList.length == 0) return;
|
489
|
map.goodsImagesBoList = JSON.stringify(map.goodsImagesBoList);
|
493
|
map.goodsImagesBoList = JSON.stringify(map.goodsImagesBoList);
|
490
|
- if (errorMsg === '') {
|
494
|
+ if (msg != '') {
|
491
|
return {
|
495
|
return {
|
492
|
"goodsImagesReq": JSON.stringify(map)
|
496
|
"goodsImagesReq": JSON.stringify(map)
|
493
|
}
|
497
|
}
|
494
|
} else {
|
498
|
} else {
|
495
|
- return errorMsg;
|
499
|
+ return '<p>请设置至少一个skc的封面</p>';
|
496
|
}
|
500
|
}
|
497
|
|
501
|
|
498
|
}; |
502
|
}; |