...
|
...
|
@@ -21,71 +21,66 @@ 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":{
|
|
|
"shopTopBanner":{
|
|
|
"id":"",
|
|
|
var resourcesNew = {
|
|
|
"shopTopBanner":{
|
|
|
"id":"",
|
|
|
"data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}]
|
|
|
},
|
|
|
"navigationBar":{
|
|
|
"id":"",
|
|
|
},
|
|
|
"navigationBar":{
|
|
|
"id":"",
|
|
|
"data": [{"name":"",url:""}, {"name":"",url:""}, {"name":"",url:""}]
|
|
|
},
|
|
|
"largeSlideImg":{
|
|
|
"id":"",
|
|
|
},
|
|
|
"largeSlideImg":{
|
|
|
"id":"",
|
|
|
"data": [
|
|
|
{"position": 5, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 4, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 3, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}
|
|
|
]
|
|
|
},
|
|
|
"oneRowTwoColImages":{
|
|
|
"id":"",
|
|
|
{"position": 5, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 4, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 3, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}
|
|
|
]
|
|
|
},
|
|
|
"oneRowTwoColImages":{
|
|
|
"id":"",
|
|
|
"data": [
|
|
|
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
]
|
|
|
},
|
|
|
"brandBrowse":{
|
|
|
"id":"",
|
|
|
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
]
|
|
|
},
|
|
|
"brandBrowse":{
|
|
|
"id":"",
|
|
|
"data": [{"position":1, "name":"", "src":"", "url":""}]
|
|
|
},
|
|
|
"recommend":{
|
|
|
"id":"",
|
|
|
},
|
|
|
"recommend":{
|
|
|
"id":"",
|
|
|
"title":"经典推荐",
|
|
|
"data": [{"position":1, "name":"", "enName":"", "src":"", "url":"","isShowInApp":"Y"},]
|
|
|
},
|
|
|
"hotRecommend":{
|
|
|
"id":"",
|
|
|
},
|
|
|
"hotRecommend":{
|
|
|
"id":"",
|
|
|
"title":"热销推荐",
|
|
|
"data": [{"position":1, "src":"", "url":""},]
|
|
|
},
|
|
|
"signboard":{
|
|
|
"id":"",
|
|
|
},
|
|
|
"signboard":{
|
|
|
"id":"",
|
|
|
"data": [{"position":1, "src":"", "url":"", "startTime": "", "endTime": "", "publishStatus": 0}]
|
|
|
},
|
|
|
"goodsTabBar":{
|
|
|
"id":"",
|
|
|
},
|
|
|
"goodsTabBar":{
|
|
|
"id":"",
|
|
|
"data": {
|
|
|
"new":[{"position":0, "name":"MORE", "url":""},],
|
|
|
"new":[{"position":0, "name":"MORE", "url":""},],
|
|
|
"hot":[{"position":0, "name":"MORE", "url":""},]
|
|
|
}
|
|
|
},
|
|
|
"newProducts":{
|
|
|
"id":"",
|
|
|
}
|
|
|
},
|
|
|
"newProducts":{
|
|
|
"id":"",
|
|
|
"data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
|
|
|
},
|
|
|
"hotProducts":{
|
|
|
"id":"",
|
|
|
},
|
|
|
"hotProducts":{
|
|
|
"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;
|
...
|
...
|
|