|
@@ -50,6 +50,7 @@ var resourcesNew = { |
|
@@ -50,6 +50,7 @@ var resourcesNew = { |
50
|
},
|
50
|
},
|
51
|
"brandBrowse":{
|
51
|
"brandBrowse":{
|
52
|
"id":"",
|
52
|
"id":"",
|
|
|
53
|
+ "title":"品牌集合",
|
53
|
"data": []
|
54
|
"data": []
|
54
|
},
|
55
|
},
|
55
|
"recommend":{
|
56
|
"recommend":{
|
|
@@ -119,6 +120,7 @@ var resourcesNew = { |
|
@@ -119,6 +120,7 @@ var resourcesNew = { |
119
|
"recommend_APP":{
|
120
|
"recommend_APP":{
|
120
|
"id":"",
|
121
|
"id":"",
|
121
|
"isUsed":"N",
|
122
|
"isUsed":"N",
|
|
|
123
|
+ "isDisplay":1,
|
122
|
"data": [{"position":1, "name":"默认商品", "enName":"", "src":defaultSrc, "url":""}]
|
124
|
"data": [{"position":1, "name":"默认商品", "enName":"", "src":defaultSrc, "url":""}]
|
123
|
}
|
125
|
}
|
124
|
} //初始化装修信息json
|
126
|
} //初始化装修信息json
|
|
@@ -188,10 +190,11 @@ function showMain(){ |
|
@@ -188,10 +190,11 @@ function showMain(){ |
188
|
//弹窗编辑主流程
|
190
|
//弹窗编辑主流程
|
189
|
function editorIconEvent(title,id){
|
191
|
function editorIconEvent(title,id){
|
190
|
$('.editorIcon').on('click',function(){
|
192
|
$('.editorIcon').on('click',function(){
|
|
|
193
|
+ var content_option = getDialogOption(title);
|
191
|
curDialogId = id;
|
194
|
curDialogId = id;
|
192
|
var option = {
|
195
|
var option = {
|
193
|
title:title,
|
196
|
title:title,
|
194
|
- content:"<div class='editorTitle'></div><div class='editor-dialog' id='"+ id +"'></div><div class='editorTip'></div> ",
|
197
|
+ content:content_option + "<div class='editorTitle'></div><div class='editor-dialog' id='"+ id +"'></div><div class='editorTip'></div> ",
|
195
|
width:'70%',
|
198
|
width:'70%',
|
196
|
button:[
|
199
|
button:[
|
197
|
{
|
200
|
{
|
|
@@ -228,6 +231,32 @@ function editorIconEvent(title,id){ |
|
@@ -228,6 +231,32 @@ function editorIconEvent(title,id){ |
228
|
})
|
231
|
})
|
229
|
}
|
232
|
}
|
230
|
|
233
|
|
|
|
234
|
+// "热门品类"编辑页面上,增加 显示/隐藏 选择项
|
|
|
235
|
+function getDialogOption(title) {
|
|
|
236
|
+
|
|
|
237
|
+ if(title != '热门品类编辑') {
|
|
|
238
|
+ return "";
|
|
|
239
|
+ }
|
|
|
240
|
+
|
|
|
241
|
+ var showInApp = 1;
|
|
|
242
|
+ var data = jsonClone.resources.recommend_APP;
|
|
|
243
|
+ if(data) {
|
|
|
244
|
+ showInApp = data.isDisplay;
|
|
|
245
|
+ }
|
|
|
246
|
+
|
|
|
247
|
+ var showRecommendOption = "";
|
|
|
248
|
+ var hideRecommendOption = "";
|
|
|
249
|
+ if(1 === showInApp) {
|
|
|
250
|
+ showRecommendOption = "<label for='recommandradioY' class='radio-inline'><input type='radio' id='recommandradioY' name='recommandradio' value='1' checked>显示</label>";
|
|
|
251
|
+ hideRecommendOption = "<label for='recommandradioN' class='radio-inline'><input type='radio' id='recommandradioN' name='recommandradio' value='0'>隐藏</label>";
|
|
|
252
|
+ } else {
|
|
|
253
|
+ showRecommendOption = "<label for='recommandradioY' class='radio-inline'><input type='radio' id='recommandradioY' name='recommandradio' value='1'>显示</label>";
|
|
|
254
|
+ hideRecommendOption = "<label for='recommandradioN' class='radio-inline'><input type='radio' id='recommandradioN' name='recommandradio' value='0' checked>隐藏</label>";
|
|
|
255
|
+ }
|
|
|
256
|
+
|
|
|
257
|
+ return "<div><label class='radio-inline'><span>显示/隐藏热门品类: </span></label>" + showRecommendOption + hideRecommendOption;
|
|
|
258
|
+}
|
|
|
259
|
+
|
231
|
/********************接口Ajax*********************/
|
260
|
/********************接口Ajax*********************/
|
232
|
|
261
|
|
233
|
//Ajax查询
|
262
|
//Ajax查询
|
|
@@ -559,6 +588,9 @@ function gridInit(id){ |
|
@@ -559,6 +588,9 @@ function gridInit(id){ |
559
|
}},
|
588
|
}},
|
560
|
]
|
589
|
]
|
561
|
});
|
590
|
});
|
|
|
591
|
+
|
|
|
592
|
+ // 品牌一览标题可编辑
|
|
|
593
|
+ $('.editorTitle').html("<div class='form-inline' style='margin-bottom: 10px'><label>标题名称编辑:</label><input class='form-control' type=text name='title' value='"+ jsonMain.resources.brandBrowse.title +"' /></div> ");
|
562
|
g.__rows=""||jsonClone.resources.brandBrowse.data;
|
594
|
g.__rows=""||jsonClone.resources.brandBrowse.data;
|
563
|
g.init(g.__rows);
|
595
|
g.init(g.__rows);
|
564
|
break;
|
596
|
break;
|
|
@@ -938,6 +970,8 @@ function freshJson(id,data,status){ |
|
@@ -938,6 +970,8 @@ function freshJson(id,data,status){ |
938
|
|
970
|
|
939
|
case "editor-brand":
|
971
|
case "editor-brand":
|
940
|
if(status == 1){
|
972
|
if(status == 1){
|
|
|
973
|
+ var title = $(".editorTitle input[name='title']").val();
|
|
|
974
|
+ jsonMain.resources.brandBrowse.title = jsonClone.resources.brandBrowse.title = title;
|
941
|
cloneArr(sortJson(data,1),jsonMain.resources.brandBrowse.data);
|
975
|
cloneArr(sortJson(data,1),jsonMain.resources.brandBrowse.data);
|
942
|
}else if(status == 0){
|
976
|
}else if(status == 0){
|
943
|
cloneArr(jsonMain.resources.brandBrowse.data,data);
|
977
|
cloneArr(jsonMain.resources.brandBrowse.data,data);
|
|
@@ -960,6 +994,9 @@ function freshJson(id,data,status){ |
|
@@ -960,6 +994,9 @@ function freshJson(id,data,status){ |
960
|
if(curPlatform == "app"){
|
994
|
if(curPlatform == "app"){
|
961
|
jsonMain.resources.recommend_APP.isUsed = "Y";
|
995
|
jsonMain.resources.recommend_APP.isUsed = "Y";
|
962
|
cloneArr(sortJson(data,1),jsonMain.resources.recommend_APP.data);
|
996
|
cloneArr(sortJson(data,1),jsonMain.resources.recommend_APP.data);
|
|
|
997
|
+
|
|
|
998
|
+ var value = $("input[type='radio'][name='recommandradio']:checked").val();
|
|
|
999
|
+ jsonMain.resources.recommend_APP.isDisplay = value;
|
963
|
}
|
1000
|
}
|
964
|
}else if(status == 0){
|
1001
|
}else if(status == 0){
|
965
|
if(curPlatform == "pc"){
|
1002
|
if(curPlatform == "pc"){
|
|
@@ -1174,12 +1211,13 @@ function editorCheck(id){ |
|
@@ -1174,12 +1211,13 @@ function editorCheck(id){ |
1174
|
break;
|
1211
|
break;
|
1175
|
|
1212
|
|
1176
|
case "editor-recommend":
|
1213
|
case "editor-recommend":
|
1177
|
- var title = $(".editorTitle input[name='title']");
|
|
|
1178
|
- if(title.length > 0 && title.val().trim() == ""){
|
|
|
1179
|
- title.focus().addClass("error");
|
|
|
1180
|
- common.util.__tip("模块标题不能为空!");
|
|
|
1181
|
- return false;
|
|
|
1182
|
- }
|
1214
|
+ // 品牌一览标题可为空,如果为空,前后台不展示标题
|
|
|
1215
|
+ // var title = $(".editorTitle input[name='title']");
|
|
|
1216
|
+ // if(title.length > 0 && title.val().trim() == ""){
|
|
|
1217
|
+ // title.focus().addClass("error");
|
|
|
1218
|
+ // common.util.__tip("模块标题不能为空!");
|
|
|
1219
|
+ // return false;
|
|
|
1220
|
+ // }
|
1183
|
if(checkNumInput() && checkUrlInput()){
|
1221
|
if(checkNumInput() && checkUrlInput()){
|
1184
|
var nameList = $(".grid input[name='name']");
|
1222
|
var nameList = $(".grid input[name='name']");
|
1185
|
for(var i=0; i<nameList.length; i++){
|
1223
|
for(var i=0; i<nameList.length; i++){
|