|
|
|
|
|
|
|
|
|
|
|
'use strict';
|
|
|
var $ = require('jquery'),
|
|
|
common = require('../../../../common/common');
|
...
|
...
|
@@ -465,17 +468,18 @@ function getFenManData () { |
|
|
var map = {
|
|
|
goodsImagesBoList: []
|
|
|
},
|
|
|
errorMsg = '';
|
|
|
msg = '';
|
|
|
|
|
|
$.each(goodsList, function (index, item) {
|
|
|
if (item.isDefault == "Y") {
|
|
|
map.productSkc = item.productSkc;
|
|
|
map.productSkn = item.productSkn;
|
|
|
}
|
|
|
|
|
|
console.info(item.goodsImagesList)
|
|
|
if (!item.goodsImagesList || item.goodsImagesList == 0) {
|
|
|
errorMsg += '<p>请设置skc:' + item.productSkc + '的封面</p>';
|
|
|
return;
|
|
|
}else{
|
|
|
msg = 'pass';
|
|
|
}
|
|
|
$.each(item.goodsImagesList, function (_index, _item) {
|
|
|
if (!_item) {
|
...
|
...
|
@@ -487,12 +491,12 @@ function getFenManData () { |
|
|
});
|
|
|
//if (map.goodsImagesBoList.length == 0) return;
|
|
|
map.goodsImagesBoList = JSON.stringify(map.goodsImagesBoList);
|
|
|
if (errorMsg === '') {
|
|
|
if (msg != '') {
|
|
|
return {
|
|
|
"goodsImagesReq": JSON.stringify(map)
|
|
|
}
|
|
|
} else {
|
|
|
return errorMsg;
|
|
|
return '<p>请设置至少一个skc的封面</p>';
|
|
|
}
|
|
|
|
|
|
}; |
...
|
...
|
|