|
@@ -5,7 +5,7 @@ var $ = require('jquery'), |
|
@@ -5,7 +5,7 @@ var $ = require('jquery'), |
5
|
|
5
|
|
6
|
var g; //grid
|
6
|
var g; //grid
|
7
|
var curDialogId; //当前打开的编辑弹层ID
|
7
|
var curDialogId; //当前打开的编辑弹层ID
|
8
|
-var curPlatform = "shopWeb-pc"; //当前渲染页面用的模板名称
|
8
|
+var curPlatform = "pc"; //当前渲染页面用的模板名称
|
9
|
var curTemplateType = "2"; //当前模板类型 1:基础模板,2:经典模板
|
9
|
var curTemplateType = "2"; //当前模板类型 1:基础模板,2:经典模板
|
10
|
var shopType = 1; //店铺类型 1:单品牌,2:多品牌
|
10
|
var shopType = 1; //店铺类型 1:单品牌,2:多品牌
|
11
|
var shopOperate = 'view'; //操作 editor:可编辑, view:查看不可编辑
|
11
|
var shopOperate = 'view'; //操作 editor:可编辑, view:查看不可编辑
|
|
@@ -28,6 +28,10 @@ var resourcesNew = { |
|
@@ -28,6 +28,10 @@ var resourcesNew = { |
28
|
"id":"",
|
28
|
"id":"",
|
29
|
"data": [{"shopSrc": defaultSrc, "detailSrc": defaultSrc, "isShowShopName": "N"}]
|
29
|
"data": [{"shopSrc": defaultSrc, "detailSrc": defaultSrc, "isShowShopName": "N"}]
|
30
|
},
|
30
|
},
|
|
|
31
|
+ "shopTopBanner_base":{
|
|
|
32
|
+ "id":"",
|
|
|
33
|
+ "data": [{"shopSrc": defaultSrc, "detailSrc": defaultSrc, "isShowShopName": "N"}]
|
|
|
34
|
+ },
|
31
|
"navigationBar":{
|
35
|
"navigationBar":{
|
32
|
"id":"",
|
36
|
"id":"",
|
33
|
"data": [{"name":"",url:""}, {"name":"",url:""}, {"name":"",url:""}]
|
37
|
"data": [{"name":"",url:""}, {"name":"",url:""}, {"name":"",url:""}]
|
|
@@ -130,23 +134,32 @@ function getParams(){ |
|
@@ -130,23 +134,32 @@ function getParams(){ |
130
|
$(".moduleTypeSelect").show().find("#templateSelect").removeAttr("disabled");
|
134
|
$(".moduleTypeSelect").show().find("#templateSelect").removeAttr("disabled");
|
131
|
$(".moduleSubmite").show().siblings().hide();
|
135
|
$(".moduleSubmite").show().siblings().hide();
|
132
|
}else if(shopOperate == 'view'){
|
136
|
}else if(shopOperate == 'view'){
|
|
|
137
|
+ $(".tabheader").hide();
|
133
|
$(".moduleTypeSelect").hide();
|
138
|
$(".moduleTypeSelect").hide();
|
134
|
$(".moduleView").show().siblings().hide();
|
139
|
$(".moduleView").show().siblings().hide();
|
135
|
}else if(shopOperate == 'check'){
|
140
|
}else if(shopOperate == 'check'){
|
|
|
141
|
+ $(".tabheader").hide();
|
136
|
$(".moduleTypeSelect").show().find("#templateSelect").attr("disabled","disabled");
|
142
|
$(".moduleTypeSelect").show().find("#templateSelect").attr("disabled","disabled");
|
137
|
$(".moduleCheck").show().siblings().hide();
|
143
|
$(".moduleCheck").show().siblings().hide();
|
138
|
}
|
144
|
}
|
139
|
}
|
145
|
}
|
140
|
//json渲染模板
|
146
|
//json渲染模板
|
141
|
function showMain(){
|
147
|
function showMain(){
|
|
|
148
|
+ // tab自动选中基础模板,经典模板
|
|
|
149
|
+ $('.tabheader .nav').find("li[data-toggle='"+ curTemplateType +"']").addClass("active");
|
|
|
150
|
+ // radio自动选中pc端或者app端
|
|
|
151
|
+ $('.moduleTypeView').find("input[name='brandLevel'][value='"+ curPlatform +"']").attr("checked","checked");
|
|
|
152
|
+ // 使用模板自动选择
|
142
|
$('#templateSelect').val(jsonMain.templateType);
|
153
|
$('#templateSelect').val(jsonMain.templateType);
|
143
|
- $("input[name='brandLevel'][value='"+curTemplateType+"']").attr('checked',"checked");
|
|
|
144
|
|
154
|
|
145
|
- if(curPlatform == "shopWeb-pc"){
|
|
|
146
|
- //console.log(jsonMain);
|
|
|
147
|
- $('#main').empty().html(common.util.__template2($("#"+curPlatform+"-"+curTemplateType).html(),jsonMain));
|
|
|
148
|
- } else if(curPlatform == "shopWeb-app"){
|
|
|
149
|
- $('#main').empty().html(common.util.__template2($("#"+curPlatform).html(),jsonMain));
|
155
|
+ //渲染装修模板
|
|
|
156
|
+ $('#main').empty().html(common.util.__template2($("#"+curTemplateType+"-"+curPlatform).html(),jsonMain));
|
|
|
157
|
+
|
|
|
158
|
+ //基础模板不显示pc端跟app端
|
|
|
159
|
+ if(curTemplateType == "1"){
|
|
|
160
|
+ $(".moduleTypeView").hide();
|
|
|
161
|
+ }else{
|
|
|
162
|
+ $(".moduleTypeView").show();
|
150
|
}
|
163
|
}
|
151
|
//单品牌,多品牌
|
164
|
//单品牌,多品牌
|
152
|
if(shopType == 2){
|
165
|
if(shopType == 2){
|
|
@@ -220,9 +233,14 @@ function findDecoration(){ |
|
@@ -220,9 +233,14 @@ function findDecoration(){ |
220
|
common.util.__tip("店铺没有品牌,无法装修,请返回添加品牌!");
|
233
|
common.util.__tip("店铺没有品牌,无法装修,请返回添加品牌!");
|
221
|
return;
|
234
|
return;
|
222
|
}
|
235
|
}
|
|
|
236
|
+ //初始化模板类型
|
223
|
if(jsonMain.templateType && jsonMain.templateType != "0"){
|
237
|
if(jsonMain.templateType && jsonMain.templateType != "0"){
|
224
|
curTemplateType = jsonMain.templateType;
|
238
|
curTemplateType = jsonMain.templateType;
|
225
|
}
|
239
|
}
|
|
|
240
|
+ //基础模板banner兼容
|
|
|
241
|
+ if(!jsonMain.resources.shopTopBanner_base){
|
|
|
242
|
+ jsonMain.resources.shopTopBanner_base = $.extend(true,{},resourcesNew.shopTopBanner_base);
|
|
|
243
|
+ }
|
226
|
//装修json克隆
|
244
|
//装修json克隆
|
227
|
jsonClone = $.extend(true,{},jsonMain);
|
245
|
jsonClone = $.extend(true,{},jsonMain);
|
228
|
|
246
|
|
|
@@ -351,9 +369,36 @@ function checkDecoration(checkStatus,comment){ |
|
@@ -351,9 +369,36 @@ function checkDecoration(checkStatus,comment){ |
351
|
//弹层表单grid生成器
|
369
|
//弹层表单grid生成器
|
352
|
function gridInit(id){
|
370
|
function gridInit(id){
|
353
|
switch (id){
|
371
|
switch (id){
|
354
|
- //店铺顶部banner
|
372
|
+ //基础模板顶部banner
|
|
|
373
|
+ case "editor-banner-base":
|
|
|
374
|
+ g = new common.grid({
|
|
|
375
|
+ hash: false,
|
|
|
376
|
+ el:"#"+id,
|
|
|
377
|
+ columns:[
|
|
|
378
|
+ {display:"店铺banner图片", render:function(item){
|
|
|
379
|
+ return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc+"' />";
|
|
|
380
|
+ }},
|
|
|
381
|
+ {display:"是否显示店铺名称", render:function(item){
|
|
|
382
|
+ if(item.isShowShopName == "Y"){
|
|
|
383
|
+ return "<lable><input type='radio' name='isShowShopName' value='Y' checked='checked'>显示店铺名称</lable><br>" +
|
|
|
384
|
+ "<lable><input type='radio' name='isShowShopName' value='N'>不显示店铺名称</lable>";
|
|
|
385
|
+ }else{
|
|
|
386
|
+ return "<lable><input type='radio' name='isShowShopName' value='Y'>显示店铺名称</lable><br>" +
|
|
|
387
|
+ "<lable><input type='radio' name='isShowShopName' value='N' checked='checked'>不显示店铺名称</lable>";
|
|
|
388
|
+ }
|
|
|
389
|
+ }},
|
|
|
390
|
+ {display:"商品详情页banner图片", render:function(item){
|
|
|
391
|
+ return "<input type=file name='DetailbannerImage' id='DetailbannerImage_"+item.__index+"' value='"+item.detailSrc+"' />";
|
|
|
392
|
+ }}
|
|
|
393
|
+ ]
|
|
|
394
|
+ });
|
|
|
395
|
+ g.__rows=""||jsonClone.resources.shopTopBanner_base.data;
|
|
|
396
|
+ g.init(g.__rows);
|
|
|
397
|
+ break;
|
|
|
398
|
+
|
|
|
399
|
+ //经典模板顶部banner
|
355
|
case "editor-banner":
|
400
|
case "editor-banner":
|
356
|
- if(curPlatform == "shopWeb-pc"){
|
401
|
+ if(curPlatform == "pc"){
|
357
|
g = new common.grid({
|
402
|
g = new common.grid({
|
358
|
hash: false,
|
403
|
hash: false,
|
359
|
el:"#"+id,
|
404
|
el:"#"+id,
|
|
@@ -377,7 +422,7 @@ function gridInit(id){ |
|
@@ -377,7 +422,7 @@ function gridInit(id){ |
377
|
});
|
422
|
});
|
378
|
g.__rows=""||jsonClone.resources.shopTopBanner.data;
|
423
|
g.__rows=""||jsonClone.resources.shopTopBanner.data;
|
379
|
}
|
424
|
}
|
380
|
- if(curPlatform == "shopWeb-app"){
|
425
|
+ if(curPlatform == "app"){
|
381
|
g = new common.grid({
|
426
|
g = new common.grid({
|
382
|
hash: false,
|
427
|
hash: false,
|
383
|
el:"#"+id,
|
428
|
el:"#"+id,
|
|
@@ -468,10 +513,10 @@ function gridInit(id){ |
|
@@ -468,10 +513,10 @@ function gridInit(id){ |
468
|
}
|
513
|
}
|
469
|
]
|
514
|
]
|
470
|
});
|
515
|
});
|
471
|
- if(curPlatform == "shopWeb-pc"){
|
516
|
+ if(curPlatform == "pc"){
|
472
|
g.__rows=""||jsonClone.resources.oneRowTwoColImages.data;
|
517
|
g.__rows=""||jsonClone.resources.oneRowTwoColImages.data;
|
473
|
}
|
518
|
}
|
474
|
- if(curPlatform == "shopWeb-app"){
|
519
|
+ if(curPlatform == "app"){
|
475
|
g.__rows=""||jsonClone.resources.oneRowTwoColImages_APP.data;
|
520
|
g.__rows=""||jsonClone.resources.oneRowTwoColImages_APP.data;
|
476
|
}
|
521
|
}
|
477
|
g.init(g.__rows);
|
522
|
g.init(g.__rows);
|
|
@@ -770,7 +815,7 @@ function gridInit(id){ |
|
@@ -770,7 +815,7 @@ function gridInit(id){ |
770
|
}}
|
815
|
}}
|
771
|
]
|
816
|
]
|
772
|
});
|
817
|
});
|
773
|
- if(curPlatform == "shopWeb-pc"){
|
818
|
+ if(curPlatform == "pc"){
|
774
|
g.__rows=""||jsonClone.resources.hotProducts.data;
|
819
|
g.__rows=""||jsonClone.resources.hotProducts.data;
|
775
|
//右侧热销排名前20商品
|
820
|
//右侧热销排名前20商品
|
776
|
if(jsonMain.resources.allHotProducts.data && jsonMain.resources.allHotProducts.data.length > 0){
|
821
|
if(jsonMain.resources.allHotProducts.data && jsonMain.resources.allHotProducts.data.length > 0){
|
|
@@ -780,7 +825,7 @@ function gridInit(id){ |
|
@@ -780,7 +825,7 @@ function gridInit(id){ |
780
|
$("#"+id+" .top20List").html("<font color='red'>* 最新上架20条加载失败,请重新加载页面!</font>");
|
825
|
$("#"+id+" .top20List").html("<font color='red'>* 最新上架20条加载失败,请重新加载页面!</font>");
|
781
|
}
|
826
|
}
|
782
|
}
|
827
|
}
|
783
|
- if(curPlatform == "shopWeb-app"){
|
828
|
+ if(curPlatform == "app"){
|
784
|
g.__rows=""||jsonClone.resources.hotProducts_APP.data;
|
829
|
g.__rows=""||jsonClone.resources.hotProducts_APP.data;
|
785
|
//右侧热销排名前20商品
|
830
|
//右侧热销排名前20商品
|
786
|
if(jsonMain.resources.allHotProducts_APP.data && jsonMain.resources.allHotProducts_APP.data.length > 0){
|
831
|
if(jsonMain.resources.allHotProducts_APP.data && jsonMain.resources.allHotProducts_APP.data.length > 0){
|
|
@@ -800,29 +845,36 @@ function gridInit(id){ |
|
@@ -800,29 +845,36 @@ function gridInit(id){ |
800
|
//弹层表单确定后刷新json数据,status参数:1:确定,0:取消
|
845
|
//弹层表单确定后刷新json数据,status参数:1:确定,0:取消
|
801
|
function freshJson(id,data,status){
|
846
|
function freshJson(id,data,status){
|
802
|
switch (id){
|
847
|
switch (id){
|
|
|
848
|
+ case "editor-banner-base":
|
|
|
849
|
+ if(status == 1){
|
|
|
850
|
+ data[0].isShowShopName = $("input[name='isShowShopName']:checked").val();
|
|
|
851
|
+ cloneArr(data,jsonMain.resources.shopTopBanner_base.data);
|
|
|
852
|
+ }else if(status == 0){
|
|
|
853
|
+ cloneArr(jsonMain.resources.shopTopBanner_base.data,data);
|
|
|
854
|
+ }
|
|
|
855
|
+ break;
|
|
|
856
|
+
|
803
|
case "editor-banner":
|
857
|
case "editor-banner":
|
804
|
if(status == 1){
|
858
|
if(status == 1){
|
805
|
data[0].isShowShopName = $("input[name='isShowShopName']:checked").val();
|
859
|
data[0].isShowShopName = $("input[name='isShowShopName']:checked").val();
|
806
|
- if(curPlatform == "shopWeb-app"){
|
|
|
807
|
- jsonMain.resources.shopTopBanner_APP.isUsed = "Y"; // 用于提交审核时候校验app端是否维护店招
|
|
|
808
|
- cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
|
|
|
809
|
- }
|
|
|
810
|
- if(curPlatform == "shopWeb-pc"){
|
860
|
+ if(curPlatform == "pc"){
|
811
|
cloneArr(data,jsonMain.resources.shopTopBanner.data);
|
861
|
cloneArr(data,jsonMain.resources.shopTopBanner.data);
|
812
|
- /* app端与pc端单独配置,不取pc端的大图了
|
|
|
813
|
if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
|
862
|
if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
|
814
|
cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
|
863
|
cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
|
815
|
cloneArr(data,jsonClone.resources.shopTopBanner_APP.data);
|
864
|
cloneArr(data,jsonClone.resources.shopTopBanner_APP.data);
|
816
|
}
|
865
|
}
|
817
|
- */
|
|
|
818
|
}
|
866
|
}
|
819
|
- }else if(status == 0){
|
|
|
820
|
- if(curPlatform == "shopWeb-app"){
|
|
|
821
|
- cloneArr(jsonMain.resources.shopTopBanner_APP.data,data);
|
867
|
+ if(curPlatform == "app"){
|
|
|
868
|
+ jsonMain.resources.shopTopBanner_APP.isUsed = "Y";
|
|
|
869
|
+ cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
|
822
|
}
|
870
|
}
|
823
|
- if(curPlatform == "shopWeb-pc"){
|
871
|
+ }else if(status == 0){
|
|
|
872
|
+ if(curPlatform == "pc"){
|
824
|
cloneArr(jsonMain.resources.shopTopBanner.data,data);
|
873
|
cloneArr(jsonMain.resources.shopTopBanner.data,data);
|
825
|
}
|
874
|
}
|
|
|
875
|
+ if(curPlatform == "app"){
|
|
|
876
|
+ cloneArr(jsonMain.resources.shopTopBanner_APP.data,data);
|
|
|
877
|
+ }
|
826
|
}
|
878
|
}
|
827
|
break;
|
879
|
break;
|
828
|
|
880
|
|
|
@@ -844,24 +896,24 @@ function freshJson(id,data,status){ |
|
@@ -844,24 +896,24 @@ function freshJson(id,data,status){ |
844
|
|
896
|
|
845
|
case "editor-smallPic":
|
897
|
case "editor-smallPic":
|
846
|
if(status == 1){
|
898
|
if(status == 1){
|
847
|
- if(curPlatform == "shopWeb-app"){
|
|
|
848
|
- jsonMain.resources.oneRowTwoColImages_APP.isUsed = "Y";
|
|
|
849
|
- cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages_APP.data);
|
|
|
850
|
- }
|
|
|
851
|
- if(curPlatform == "shopWeb-pc"){
|
899
|
+ if(curPlatform == "pc"){
|
852
|
cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages.data);
|
900
|
cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages.data);
|
853
|
if(jsonMain.resources.oneRowTwoColImages_APP.isUsed == "N"){
|
901
|
if(jsonMain.resources.oneRowTwoColImages_APP.isUsed == "N"){
|
854
|
cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages_APP.data);
|
902
|
cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages_APP.data);
|
855
|
cloneArr(sortJson(data,1),jsonClone.resources.oneRowTwoColImages_APP.data);
|
903
|
cloneArr(sortJson(data,1),jsonClone.resources.oneRowTwoColImages_APP.data);
|
856
|
}
|
904
|
}
|
857
|
}
|
905
|
}
|
858
|
- }else if(status == 0){
|
|
|
859
|
- if(curPlatform == "shopWeb-app"){
|
|
|
860
|
- cloneArr(jsonMain.resources.oneRowTwoColImages_APP.data,data);
|
906
|
+ if(curPlatform == "app"){
|
|
|
907
|
+ jsonMain.resources.oneRowTwoColImages_APP.isUsed = "Y";
|
|
|
908
|
+ cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages_APP.data);
|
861
|
}
|
909
|
}
|
862
|
- if(curPlatform == "shopWeb-pc"){
|
910
|
+ }else if(status == 0){
|
|
|
911
|
+ if(curPlatform == "pc"){
|
863
|
cloneArr(jsonMain.resources.oneRowTwoColImages.data,data);
|
912
|
cloneArr(jsonMain.resources.oneRowTwoColImages.data,data);
|
864
|
}
|
913
|
}
|
|
|
914
|
+ if(curPlatform == "app"){
|
|
|
915
|
+ cloneArr(jsonMain.resources.oneRowTwoColImages_APP.data,data);
|
|
|
916
|
+ }
|
865
|
}
|
917
|
}
|
866
|
break;
|
918
|
break;
|
867
|
|
919
|
|
|
@@ -925,24 +977,24 @@ function freshJson(id,data,status){ |
|
@@ -925,24 +977,24 @@ function freshJson(id,data,status){ |
925
|
|
977
|
|
926
|
case "editor-hotProduct":
|
978
|
case "editor-hotProduct":
|
927
|
if(status == 1){
|
979
|
if(status == 1){
|
928
|
- if(curPlatform == "shopWeb-app"){
|
|
|
929
|
- jsonMain.resources.hotProducts_APP.isUsed = "Y";
|
|
|
930
|
- cloneArr(sortJson(data,1),jsonMain.resources.hotProducts_APP.data);
|
|
|
931
|
- }
|
|
|
932
|
- if(curPlatform == "shopWeb-pc"){
|
980
|
+ if(curPlatform == "pc"){
|
933
|
cloneArr(sortJson(data,1),jsonMain.resources.hotProducts.data);
|
981
|
cloneArr(sortJson(data,1),jsonMain.resources.hotProducts.data);
|
934
|
if(jsonMain.resources.hotProducts_APP.isUsed == "N"){
|
982
|
if(jsonMain.resources.hotProducts_APP.isUsed == "N"){
|
935
|
cloneArr(sortJson(data,1),jsonMain.resources.hotProducts_APP.data);
|
983
|
cloneArr(sortJson(data,1),jsonMain.resources.hotProducts_APP.data);
|
936
|
cloneArr(sortJson(data,1),jsonClone.resources.hotProducts_APP.data);
|
984
|
cloneArr(sortJson(data,1),jsonClone.resources.hotProducts_APP.data);
|
937
|
}
|
985
|
}
|
938
|
}
|
986
|
}
|
939
|
- }else if(status == 0){
|
|
|
940
|
- if(curPlatform == "shopWeb-app"){
|
|
|
941
|
- cloneArr(jsonMain.resources.hotProducts_APP.data,data);
|
987
|
+ if(curPlatform == "app"){
|
|
|
988
|
+ jsonMain.resources.hotProducts_APP.isUsed = "Y";
|
|
|
989
|
+ cloneArr(sortJson(data,1),jsonMain.resources.hotProducts_APP.data);
|
942
|
}
|
990
|
}
|
943
|
- if(curPlatform == "shopWeb-pc"){
|
991
|
+ }else if(status == 0){
|
|
|
992
|
+ if(curPlatform == "pc"){
|
944
|
cloneArr(jsonMain.resources.hotProducts.data,data);
|
993
|
cloneArr(jsonMain.resources.hotProducts.data,data);
|
945
|
}
|
994
|
}
|
|
|
995
|
+ if(curPlatform == "app"){
|
|
|
996
|
+ cloneArr(jsonMain.resources.hotProducts_APP.data,data);
|
|
|
997
|
+ }
|
946
|
}
|
998
|
}
|
947
|
break;
|
999
|
break;
|
948
|
|
1000
|
|
|
@@ -954,28 +1006,31 @@ function freshJson(id,data,status){ |
|
@@ -954,28 +1006,31 @@ function freshJson(id,data,status){ |
954
|
function editorTipInit(id){
|
1006
|
function editorTipInit(id){
|
955
|
var tipHtml = "";
|
1007
|
var tipHtml = "";
|
956
|
switch (id){
|
1008
|
switch (id){
|
|
|
1009
|
+ case "editor-banner-base":
|
|
|
1010
|
+ tipHtml = "<span>提示:请上传像素1150*200的图片,图片大小不能超过500KB。</span>";
|
|
|
1011
|
+ break;
|
957
|
case "editor-banner":
|
1012
|
case "editor-banner":
|
958
|
- if(curPlatform == "shopWeb-pc"){
|
|
|
959
|
- tipHtml = "<span>提示:请上传像素1150*150的图片,图片大小不能大于500KB。</span>";
|
1013
|
+ if(curPlatform == "pc"){
|
|
|
1014
|
+ tipHtml = "<span>提示:请上传像素1150*200的图片,图片大小不能超过500KB。</span>";
|
960
|
}
|
1015
|
}
|
961
|
- if(curPlatform == "shopWeb-app"){
|
|
|
962
|
- tipHtml = "<span>提示:请上传像素640*200的图片,图片大小不能大于500KB。</span>";
|
1016
|
+ if(curPlatform == "app"){
|
|
|
1017
|
+ tipHtml = "<span>提示:请上传像素640*200的图片,图片大小不能超过500KB。</span>";
|
963
|
}
|
1018
|
}
|
964
|
break;
|
1019
|
break;
|
965
|
case "editor-nav":
|
1020
|
case "editor-nav":
|
966
|
tipHtml = "<span>提示:标题名称最多5个汉字。</span>";
|
1021
|
tipHtml = "<span>提示:标题名称最多5个汉字。</span>";
|
967
|
break;
|
1022
|
break;
|
968
|
case "editor-largePic":
|
1023
|
case "editor-largePic":
|
969
|
- tipHtml = "<span>提示:请上传像素660*358的图片,图片大小不能大于500KB,该图片会适配到APP端。</span>";
|
1024
|
+ tipHtml = "<span>提示:请上传像素660*358的图片,图片大小不能超过500KB,该图片会适配到APP端。</span>";
|
970
|
break;
|
1025
|
break;
|
971
|
case "editor-largePic-app":
|
1026
|
case "editor-largePic-app":
|
972
|
tipHtml = "<span>提示:由PC端适配,修改请到PC端修改。</span>";
|
1027
|
tipHtml = "<span>提示:由PC端适配,修改请到PC端修改。</span>";
|
973
|
break;
|
1028
|
break;
|
974
|
case "editor-smallPic":
|
1029
|
case "editor-smallPic":
|
975
|
- if(curPlatform == "shopWeb-app"){
|
|
|
976
|
- tipHtml = "<span>提示:请上传像素275*160的图片,图片大小不能大于500KB。</span>";
|
1030
|
+ if(curPlatform == "app"){
|
|
|
1031
|
+ tipHtml = "<span>提示:请上传像素275*160的图片,图片大小不能超过500KB。</span>";
|
977
|
}else{
|
1032
|
}else{
|
978
|
- tipHtml = "<span>提示:请上传像素300*174的图片,图片大小不能大于500KB。</span>";
|
1033
|
+ tipHtml = "<span>提示:请上传像素300*174的图片,图片大小不能超过500KB。</span>";
|
979
|
}
|
1034
|
}
|
980
|
break;
|
1035
|
break;
|
981
|
case "editor-brand":
|
1036
|
case "editor-brand":
|
|
@@ -985,16 +1040,16 @@ function editorTipInit(id){ |
|
@@ -985,16 +1040,16 @@ function editorTipInit(id){ |
985
|
tipHtml = "<span>提示:【品牌一览】由PC端【品牌集合】适配,修改请到PC端【品牌集合】修改。</span>";
|
1040
|
tipHtml = "<span>提示:【品牌一览】由PC端【品牌集合】适配,修改请到PC端【品牌集合】修改。</span>";
|
986
|
break;
|
1041
|
break;
|
987
|
case "editor-recommend":
|
1042
|
case "editor-recommend":
|
988
|
- tipHtml = "<span>提示:请上传像素150*150的图片,图片大小不能大于500KB,图片和标题会适配到APP的【热门品类】中。</span>";
|
1043
|
+ tipHtml = "<span>提示:请上传像素150*150的图片,图片大小不能超过500KB,图片和标题会适配到APP的【热门品类】中。</span>";
|
989
|
break;
|
1044
|
break;
|
990
|
case "editor-recommend-app":
|
1045
|
case "editor-recommend-app":
|
991
|
tipHtml = "<span>提示:【热门品类】由PC端【经典推荐】适配,修改请到PC端【经典推荐】修改。</span>";
|
1046
|
tipHtml = "<span>提示:【热门品类】由PC端【经典推荐】适配,修改请到PC端【经典推荐】修改。</span>";
|
992
|
break;
|
1047
|
break;
|
993
|
case "editor-signboard":
|
1048
|
case "editor-signboard":
|
994
|
- tipHtml = "<span>提示:请上传像素160*240的图片,图片大小不能大于500KB。</span>";
|
1049
|
+ tipHtml = "<span>提示:请上传像素160*240的图片,图片大小不能超过500KB。</span>";
|
995
|
break;
|
1050
|
break;
|
996
|
case "editor-hotRecommend":
|
1051
|
case "editor-hotRecommend":
|
997
|
- tipHtml = "<span>提示:请上传像素160*240的图片,图片大小不能大于500KB。</span>";
|
1052
|
+ tipHtml = "<span>提示:请上传像素160*240的图片,图片大小不能超过500KB。</span>";
|
998
|
break;
|
1053
|
break;
|
999
|
case "editor-newGoodTab":
|
1054
|
case "editor-newGoodTab":
|
1000
|
tipHtml = "<span>提示:最多编辑5个标签,标题名称最多5个汉字。</span>";
|
1055
|
tipHtml = "<span>提示:最多编辑5个标签,标题名称最多5个汉字。</span>";
|
|
@@ -1293,17 +1348,13 @@ function checkdate(startDate,endDate){ |
|
@@ -1293,17 +1348,13 @@ function checkdate(startDate,endDate){ |
1293
|
//pc跟app的tab选项事件
|
1348
|
//pc跟app的tab选项事件
|
1294
|
$(document).on("click",".tabheader .nav-tabs li",function(){
|
1349
|
$(document).on("click",".tabheader .nav-tabs li",function(){
|
1295
|
$(this).addClass('active').siblings('li').removeClass('active');
|
1350
|
$(this).addClass('active').siblings('li').removeClass('active');
|
1296
|
- curPlatform = $(this).attr("data-toggle");
|
|
|
1297
|
- if(curPlatform == "shopWeb-app"){
|
|
|
1298
|
- $(".moduleTypeView").hide();
|
|
|
1299
|
- }else{
|
|
|
1300
|
- $(".moduleTypeView").show();
|
|
|
1301
|
- }
|
1351
|
+ curTemplateType = $(this).attr("data-toggle");
|
|
|
1352
|
+ curPlatform = "pc";
|
1302
|
showMain();
|
1353
|
showMain();
|
1303
|
})
|
1354
|
})
|
1304
|
//基础模板,经典模板切换
|
1355
|
//基础模板,经典模板切换
|
1305
|
$(document).on("click","input[name=brandLevel]",function(){
|
1356
|
$(document).on("click","input[name=brandLevel]",function(){
|
1306
|
- curTemplateType = $("input[name=brandLevel]:checked").val();
|
1357
|
+ curPlatform = $("input[name=brandLevel]:checked").val();
|
1307
|
showMain();
|
1358
|
showMain();
|
1308
|
})
|
1359
|
})
|
1309
|
//选择使用模板
|
1360
|
//选择使用模板
|
|
@@ -1317,14 +1368,6 @@ $(document).on("click","#saveModule",function(){ |
|
@@ -1317,14 +1368,6 @@ $(document).on("click","#saveModule",function(){ |
1317
|
})
|
1368
|
})
|
1318
|
//提交审核
|
1369
|
//提交审核
|
1319
|
$(document).on("click","#submitModule",function(){
|
1370
|
$(document).on("click","#submitModule",function(){
|
1320
|
- if(jsonMain.resources.shopTopBanner.data[0].shopSrc == defaultSrc){
|
|
|
1321
|
- common.util.__tip("PC端没有维护顶部banner!");
|
|
|
1322
|
- return;
|
|
|
1323
|
- }
|
|
|
1324
|
- if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
|
|
|
1325
|
- common.util.__tip("APP端没有维护顶部banner!");
|
|
|
1326
|
- return;
|
|
|
1327
|
- }
|
|
|
1328
|
if(jsonMain.templateType == "0"){
|
1371
|
if(jsonMain.templateType == "0"){
|
1329
|
common.util.__tip("请选择展示使用模板!");
|
1372
|
common.util.__tip("请选择展示使用模板!");
|
1330
|
$("#templateSelect").focus().addClass("error");
|
1373
|
$("#templateSelect").focus().addClass("error");
|