Authored by liuyue

网销

... ... @@ -220,6 +220,7 @@ if (window.NETSALEDATA && window.NETSALEDATA.goodsList) {
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
goodsList: goodsList
}));
common.edit.ajaxfileupload("#fenmianfile", {
params: {
__type: "upload",
... ... @@ -227,19 +228,22 @@ common.edit.ajaxfileupload("#fenmianfile", {
},
valid_extensions: ['gif', 'png', 'jpg', 'jpeg'],
onComplete: function(response) {
console.log(response);
if (response.status && response.code == 200) {
var item = goodsList[$(this).data("index")].goodsImagesList;
var item = goodsList[$(this).data("index")].goodsImagesList || [];
var len = item ? item.length : 1;
var data = {
"angle": 0,
"genderCover": 0,
"imageUrl": response.data,
"orderBy": item.length,
"orderBy": len,
"productSkc": goodsList[$(this).data("index")].productSkc,
"productSkn": goodsList[$(this).data("index")].productSkn,
"__index": item.length,
"__index": len,
"index": $(this).data("index")
};
item.push(data);
goodsList[$(this).data("index")].goodsImagesList = item;
$(this).parents(".cover-image-item").before(common.util.__template2($("#fenmianImgTemp").html(), data));
} else {
common.util.__tip(response.message);
... ... @@ -287,7 +291,8 @@ GOLABDATA.on("fenmian", function() {
var map = {
goodsImagesBoList: []
};
$.each(goodsImagesList, function(index, item) {
$.each(goodsList, function(index, item) {
if (item.isDefault == "Y") {
map.productSkc = item.productSkc;
map.productSkn = item.productSkn;
... ...