Authored by linlong

网销信息封面设置

... ... @@ -23,6 +23,11 @@
<p>SKC: [[item.productSkc]]</p>
<p>[[item.goodsName]]</p>
<p>[[item.factoryGoodsName || '']]</p>
<p>SKU:
[[each item.goodsSizeList as item2 index2]]
[[item2.productSku || '']]
[[/each]]
</p>
</div>
<div class="cover-color">颜色封面:</div>
</div>
... ...
'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>';
}
};
... ...