|
@@ -21,71 +21,66 @@ var ENUM = { |
|
@@ -21,71 +21,66 @@ var ENUM = { |
21
|
"editor-newProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""},
|
21
|
"editor-newProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""},
|
22
|
"editor-hotProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""}
|
22
|
"editor-hotProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""}
|
23
|
}; //添加一条不同弹层使用的初始化模板
|
23
|
}; //添加一条不同弹层使用的初始化模板
|
24
|
-var jsonNew = {
|
|
|
25
|
- "shopsId":0,
|
|
|
26
|
- "platform": "PC",
|
|
|
27
|
- "templateName": "2",
|
|
|
28
|
- "resources":{
|
|
|
29
|
- "shopTopBanner":{
|
|
|
30
|
- "id":"",
|
24
|
+var resourcesNew = {
|
|
|
25
|
+ "shopTopBanner":{
|
|
|
26
|
+ "id":"",
|
31
|
"data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}]
|
27
|
"data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}]
|
32
|
- },
|
|
|
33
|
- "navigationBar":{
|
|
|
34
|
- "id":"",
|
28
|
+ },
|
|
|
29
|
+ "navigationBar":{
|
|
|
30
|
+ "id":"",
|
35
|
"data": [{"name":"",url:""}, {"name":"",url:""}, {"name":"",url:""}]
|
31
|
"data": [{"name":"",url:""}, {"name":"",url:""}, {"name":"",url:""}]
|
36
|
- },
|
|
|
37
|
- "largeSlideImg":{
|
|
|
38
|
- "id":"",
|
32
|
+ },
|
|
|
33
|
+ "largeSlideImg":{
|
|
|
34
|
+ "id":"",
|
39
|
"data": [
|
35
|
"data": [
|
40
|
- {"position": 5, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
41
|
- {"position": 4, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
42
|
- {"position": 3, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
43
|
- {"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
44
|
- {"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}
|
|
|
45
|
- ]
|
|
|
46
|
- },
|
|
|
47
|
- "oneRowTwoColImages":{
|
|
|
48
|
- "id":"",
|
36
|
+ {"position": 5, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
37
|
+ {"position": 4, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
38
|
+ {"position": 3, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
39
|
+ {"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
40
|
+ {"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}
|
|
|
41
|
+ ]
|
|
|
42
|
+ },
|
|
|
43
|
+ "oneRowTwoColImages":{
|
|
|
44
|
+ "id":"",
|
49
|
"data": [
|
45
|
"data": [
|
50
|
- {"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
51
|
- {"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
52
|
- ]
|
|
|
53
|
- },
|
|
|
54
|
- "brandBrowse":{
|
|
|
55
|
- "id":"",
|
46
|
+ {"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
47
|
+ {"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
48
|
+ ]
|
|
|
49
|
+ },
|
|
|
50
|
+ "brandBrowse":{
|
|
|
51
|
+ "id":"",
|
56
|
"data": [{"position":1, "name":"", "src":"", "url":""}]
|
52
|
"data": [{"position":1, "name":"", "src":"", "url":""}]
|
57
|
- },
|
|
|
58
|
- "recommend":{
|
|
|
59
|
- "id":"",
|
53
|
+ },
|
|
|
54
|
+ "recommend":{
|
|
|
55
|
+ "id":"",
|
60
|
"title":"经典推荐",
|
56
|
"title":"经典推荐",
|
61
|
"data": [{"position":1, "name":"", "enName":"", "src":"", "url":"","isShowInApp":"Y"},]
|
57
|
"data": [{"position":1, "name":"", "enName":"", "src":"", "url":"","isShowInApp":"Y"},]
|
62
|
- },
|
|
|
63
|
- "hotRecommend":{
|
|
|
64
|
- "id":"",
|
58
|
+ },
|
|
|
59
|
+ "hotRecommend":{
|
|
|
60
|
+ "id":"",
|
65
|
"title":"热销推荐",
|
61
|
"title":"热销推荐",
|
66
|
"data": [{"position":1, "src":"", "url":""},]
|
62
|
"data": [{"position":1, "src":"", "url":""},]
|
67
|
- },
|
|
|
68
|
- "signboard":{
|
|
|
69
|
- "id":"",
|
63
|
+ },
|
|
|
64
|
+ "signboard":{
|
|
|
65
|
+ "id":"",
|
70
|
"data": [{"position":1, "src":"", "url":"", "startTime": "", "endTime": "", "publishStatus": 0}]
|
66
|
"data": [{"position":1, "src":"", "url":"", "startTime": "", "endTime": "", "publishStatus": 0}]
|
71
|
- },
|
|
|
72
|
- "goodsTabBar":{
|
|
|
73
|
- "id":"",
|
67
|
+ },
|
|
|
68
|
+ "goodsTabBar":{
|
|
|
69
|
+ "id":"",
|
74
|
"data": {
|
70
|
"data": {
|
75
|
- "new":[{"position":0, "name":"MORE", "url":""},],
|
71
|
+ "new":[{"position":0, "name":"MORE", "url":""},],
|
76
|
"hot":[{"position":0, "name":"MORE", "url":""},]
|
72
|
"hot":[{"position":0, "name":"MORE", "url":""},]
|
77
|
- }
|
|
|
78
|
- },
|
|
|
79
|
- "newProducts":{
|
|
|
80
|
- "id":"",
|
73
|
+ }
|
|
|
74
|
+ },
|
|
|
75
|
+ "newProducts":{
|
|
|
76
|
+ "id":"",
|
81
|
"data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
|
77
|
"data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
|
82
|
- },
|
|
|
83
|
- "hotProducts":{
|
|
|
84
|
- "id":"",
|
78
|
+ },
|
|
|
79
|
+ "hotProducts":{
|
|
|
80
|
+ "id":"",
|
85
|
"data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
|
81
|
"data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
|
86
|
- }
|
|
|
87
|
}
|
82
|
}
|
88
|
-}; //初始化json
|
83
|
+} //初始化装修信息json
|
89
|
var _id, templateId, jsonMain, jsonClone, topNewProducts, topHotProducts;
|
84
|
var _id, templateId, jsonMain, jsonClone, topNewProducts, topHotProducts;
|
90
|
|
85
|
|
91
|
getParams();
|
86
|
getParams();
|
|
@@ -182,7 +177,7 @@ function findDecoration(){ |
|
@@ -182,7 +177,7 @@ function findDecoration(){ |
182
|
}
|
177
|
}
|
183
|
|
178
|
|
184
|
if($.isEmptyObject(jsonMain.resources)){
|
179
|
if($.isEmptyObject(jsonMain.resources)){
|
185
|
- jsonMain.resources = $.extend(true,{},jsonNew.resources);
|
180
|
+ jsonMain.resources = $.extend(true,{},resourcesNew);
|
186
|
}
|
181
|
}
|
187
|
jsonClone = $.extend(true,{},jsonMain);
|
182
|
jsonClone = $.extend(true,{},jsonMain);
|
188
|
|
183
|
|
|
@@ -364,25 +359,8 @@ function gridInit(id){ |
|
@@ -364,25 +359,8 @@ function gridInit(id){ |
364
|
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
|
359
|
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
|
365
|
}},
|
360
|
}},
|
366
|
{display:"名称", render:function(item){
|
361
|
{display:"名称", render:function(item){
|
367
|
- return "<input class='form-control inputChange' type=text name='name' value='"+item.name+"' data-index='"+item.__index+"' />";
|
|
|
368
|
- }},
|
|
|
369
|
- {display:"链接", render:function(item){
|
|
|
370
|
- return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />";
|
362
|
+ return item.name;
|
371
|
}},
|
363
|
}},
|
372
|
- {display:"操作", render:function(item){
|
|
|
373
|
- var htmlPic = "",i=item.__index;
|
|
|
374
|
- if(i == (g.__rows.length-1) && g.__rows.length > 1){
|
|
|
375
|
- htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
|
|
|
376
|
- htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
|
|
|
377
|
- }
|
|
|
378
|
- if(i < (g.__rows.length-1) && g.__rows.length > 1){
|
|
|
379
|
- htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
|
|
|
380
|
- }
|
|
|
381
|
- if(i == (g.__rows.length-1) && g.__rows.length == 1){
|
|
|
382
|
- htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
|
|
|
383
|
- }
|
|
|
384
|
- return htmlPic;
|
|
|
385
|
- }}
|
|
|
386
|
]
|
364
|
]
|
387
|
});
|
365
|
});
|
388
|
g.__rows=""||jsonClone.resources.brandBrowse.data;
|
366
|
g.__rows=""||jsonClone.resources.brandBrowse.data;
|