Authored by dongjunjie

店铺装修4

... ... @@ -21,11 +21,7 @@ var ENUM = {
"editor-newProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""},
"editor-hotProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""}
}; //添加一条不同弹层使用的初始化模板
var jsonNew = {
"shopsId":0,
"platform": "PC",
"templateName": "2",
"resources":{
var resourcesNew = {
"shopTopBanner":{
"id":"",
"data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}]
... ... @@ -84,8 +80,7 @@ var jsonNew = {
"id":"",
"data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
}
}
}; //初始化json
} //初始化装修信息json
var _id, templateId, jsonMain, jsonClone, topNewProducts, topHotProducts;
getParams();
... ... @@ -182,7 +177,7 @@ function findDecoration(){
}
if($.isEmptyObject(jsonMain.resources)){
jsonMain.resources = $.extend(true,{},jsonNew.resources);
jsonMain.resources = $.extend(true,{},resourcesNew);
}
jsonClone = $.extend(true,{},jsonMain);
... ... @@ -364,25 +359,8 @@ function gridInit(id){
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}},
{display:"名称", render:function(item){
return "<input class='form-control inputChange' type=text name='name' value='"+item.name+"' data-index='"+item.__index+"' />";
}},
{display:"链接", render:function(item){
return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />";
return item.name;
}},
{display:"操作", render:function(item){
var htmlPic = "",i=item.__index;
if(i == (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
}
if(i < (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
}
if(i == (g.__rows.length-1) && g.__rows.length == 1){
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
}
return htmlPic;
}}
]
});
g.__rows=""||jsonClone.resources.brandBrowse.data;
... ...
//exports.domain = require('../config/common.js').domain;
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://localhost:30012';
exports.domain = 'http://172.16.6.115:8080/platform';
//exports.domain = 'http://172.16.6.115:8080/platform';
exports.res = [
{
... ...