...
|
...
|
@@ -1244,34 +1244,6 @@ webpackJsonp([170],{ |
|
|
Bll.moduleDataList[index].moduleData.properties = {};
|
|
|
}
|
|
|
|
|
|
if(moduleType == 'RecommendProduct' || moduleType == 'AppRecommendProduct') {
|
|
|
validation = Bll.validator.validateModule(moduleType, Bll.recommendProduct);
|
|
|
Bll.saveRecommendProduct(index);
|
|
|
var displayType = Bll.recommendProduct.displayType;
|
|
|
if(displayType == 1){// 根据skn查询
|
|
|
sknList = Bll.recommendProduct.sknList;
|
|
|
if(sknList.length >0){
|
|
|
var productInfo = Bll.getProductDetailBySkns(sknList.toString());
|
|
|
Bll.moduleDataList[index].moduleData.productInfo = productInfo;
|
|
|
}
|
|
|
}else if(displayType == 0){ // 通过搜索查询商品信息;
|
|
|
var lineNumber = Bll.recommendProduct.lineNumber;
|
|
|
var order = Bll.moduleDataList[index].moduleData.data[0].order;
|
|
|
var shopId = Bll.shopId;
|
|
|
searchProductInfo = Bll.searchProductDetail(lineNumber, order, shopId);
|
|
|
Bll.moduleDataList[index].moduleData.productInfo = searchProductInfo;
|
|
|
if(searchProductInfo == null || searchProductInfo === undefined || searchProductInfo.length <= 0){
|
|
|
common.util.__tip('推荐商品模块自动获取该店铺下商品为空,请先在该店铺下添加可售商品!', 'warning');
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
validation = Bll.validator.validateModule(moduleType, Bll.moduleGrid.__rows);
|
|
|
Bll.moduleDataList[index].moduleData.data = Bll.moduleGrid.__rows;
|
|
|
}
|
|
|
if(! validation) {
|
|
|
return false;
|
|
|
}
|
|
|
// 处理模块数据,增加资源位标识,用于热点分析
|
|
|
$.each(Bll.moduleDataList[index].moduleData.data, function(index, item) {
|
|
|
item.id = Bll.generateRandomNumber();
|
...
|
...
|
@@ -1301,7 +1273,34 @@ webpackJsonp([170],{ |
|
|
|
|
|
// 保存是否设置模块间距
|
|
|
Bll.moduleDataList[index].moduleData.properties.isModuleMargin = +$('#moduleMargin').val();
|
|
|
|
|
|
if(moduleType == 'RecommendProduct' || moduleType == 'AppRecommendProduct') {
|
|
|
validation = Bll.validator.validateModule(moduleType, Bll.recommendProduct);
|
|
|
Bll.saveRecommendProduct(index);
|
|
|
var displayType = Bll.recommendProduct.displayType;
|
|
|
if(displayType == 1){// 根据skn查询
|
|
|
sknList = Bll.recommendProduct.sknList;
|
|
|
if(sknList.length >0){
|
|
|
var productInfo = Bll.getProductDetailBySkns(sknList.toString());
|
|
|
Bll.moduleDataList[index].moduleData.productInfo = productInfo;
|
|
|
}
|
|
|
}else if(displayType == 0){ // 通过搜索查询商品信息;
|
|
|
var lineNumber = Bll.recommendProduct.lineNumber;
|
|
|
var order = Bll.moduleDataList[index].moduleData.data[0].order;
|
|
|
var shopId = Bll.shopId;
|
|
|
searchProductInfo = Bll.searchProductDetail(lineNumber, order, shopId);
|
|
|
Bll.moduleDataList[index].moduleData.productInfo = searchProductInfo;
|
|
|
if(searchProductInfo == null || searchProductInfo === undefined || searchProductInfo.length <= 0){
|
|
|
common.util.__tip('推荐商品模块自动获取该店铺下商品为空,请先在该店铺下添加可售商品!', 'warning');
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
validation = Bll.validator.validateModule(moduleType, Bll.moduleGrid.__rows);
|
|
|
Bll.moduleDataList[index].moduleData.data = Bll.moduleGrid.__rows;
|
|
|
}
|
|
|
if(! validation) {
|
|
|
return false;
|
|
|
}
|
|
|
Bll.reloadMain(index);
|
|
|
// 更新计数器
|
|
|
Bll.changedModuleMonitor++;
|
...
|
...
|
|