...
|
...
|
@@ -177,10 +177,11 @@ $(document).on("change", ".poseditimg .pos-text", function() { |
|
|
//添加
|
|
|
$(document).on("click", "#dapeiadd", function() {
|
|
|
Bll.toast("添加搭配", {}, "/netSale/insertCollocation");
|
|
|
return false;
|
|
|
});
|
|
|
//保存
|
|
|
$(document).on("click", "#dapeisave", function() {
|
|
|
|
|
|
//添加的时候已经保存
|
|
|
});
|
|
|
//删除
|
|
|
$(document).on("click", "#dapeiTable .delete", function() {
|
...
|
...
|
@@ -212,13 +213,13 @@ $(document).on("click", "#dapeiTable .edit", function() { |
|
|
|
|
|
|
|
|
/*封面设置*/
|
|
|
var goodsImagesList = {};
|
|
|
if (window.NETSALEDATA && window.NETSALEDATA.goodsImagesList) {
|
|
|
goodsImagesList = window.NETSALEDATA.goodsImagesList;
|
|
|
var goodsList = {};
|
|
|
if (window.NETSALEDATA && window.NETSALEDATA.goodsList) {
|
|
|
goodsList = window.NETSALEDATA.goodsList;
|
|
|
}
|
|
|
console.log("封面设置", goodsImagesList);
|
|
|
console.log("封面设置", goodsList);
|
|
|
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
|
|
|
goodsImagesList: goodsImagesList
|
|
|
goodsList: goodsList
|
|
|
}));
|
|
|
common.edit.ajaxfileupload("#fenmianfile", {
|
|
|
params: {
|
...
|
...
|
@@ -228,14 +229,14 @@ common.edit.ajaxfileupload("#fenmianfile", { |
|
|
valid_extensions: ['gif', 'png', 'jpg', 'jpeg'],
|
|
|
onComplete: function(response) {
|
|
|
if (response.status && response.code == 200) {
|
|
|
var item = goodsImagesList[$(this).data("index")].goodsImagesList;
|
|
|
var item = goodsList[$(this).data("index")].goodsImagesList;
|
|
|
var data = {
|
|
|
"angle": 0,
|
|
|
"genderCover": 0,
|
|
|
"imageUrl": response.data,
|
|
|
"orderBy": item.length,
|
|
|
"productSkc": goodsImagesList[$(this).data("index")].productSkc,
|
|
|
"productSkn": goodsImagesList[$(this).data("index")].productSkn,
|
|
|
"productSkc": goodsList[$(this).data("index")].productSkc,
|
|
|
"productSkn": goodsList[$(this).data("index")].productSkn,
|
|
|
"__index": item.length,
|
|
|
"index": $(this).data("index")
|
|
|
};
|
...
|
...
|
@@ -251,7 +252,7 @@ common.edit.ajaxfileupload("#fenmianfile", { |
|
|
$(document).on("click", ".cover-color .btn-metro", function() {
|
|
|
var index = $(this).parents("ul").data("index");
|
|
|
var index1 = $(this).parents(".cover-image-item").data("index");
|
|
|
var item = goodsImagesList[index].goodsImagesList[index1];
|
|
|
var item = goodsList[index].goodsImagesList[index1];
|
|
|
if ($(this).hasClass("info")) {
|
|
|
$(this).removeClass("info");
|
|
|
} else {
|
...
|
...
|
@@ -265,7 +266,7 @@ $(document).on("click", ".cover-color .btn-metro", function() { |
|
|
});
|
|
|
$(document).on("click", ".goods-color a", function() {
|
|
|
var index = $(this).data("index");
|
|
|
var item = goodsImagesList[index];
|
|
|
var item = goodsList[index];
|
|
|
if ($(this).hasClass("info")) {
|
|
|
$(this).removeClass("info");
|
|
|
} else {
|
...
|
...
|
@@ -302,3 +303,5 @@ GOLABDATA.on("fenmian", function() { |
|
|
"goodsImagesReq": JSON.stringify(map)
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
|