Authored by 陶雨

资源内容将弹窗id放入button数组

1 var Button = [ 1 var Button = [
2 { 2 {
3 - template_intro: "文本", 3 + button_name:"文本",
  4 + dialog:"template_dialog_text",
4 data: {text: ""}, 5 data: {text: ""},
5 template_name: "text" 6 template_name: "text"
6 }, 7 },
7 { 8 {
8 - template_intro: "一张图", 9 + template_intro: "一张图片",
  10 + button_name:"一张图",
  11 + dialog:"template_dialog_grid",
9 template_name: "singleImage", 12 template_name: "singleImage",
10 data: [{ 13 data: [{
11 "url": { 14 "url": {
@@ -14,12 +17,13 @@ var Button = [ @@ -14,12 +17,13 @@ var Button = [
14 }, 17 },
15 "alt": "", 18 "alt": "",
16 "src": "", 19 "src": "",
17 - "imgId": "" 20 + "imgId": "0"
18 }] 21 }]
19 }, 22 },
20 { 23 {
21 - template_intro: "添加小图", 24 + button_name:"添加小图",
22 template_name: "smallPic", 25 template_name: "smallPic",
  26 + dialog:"template_dialog_grid",
23 data: [{ 27 data: [{
24 "url": { 28 "url": {
25 "action": "", 29 "action": "",
@@ -27,7 +31,7 @@ var Button = [ @@ -27,7 +31,7 @@ var Button = [
27 }, 31 },
28 "alt": "", 32 "alt": "",
29 "src": "", 33 "src": "",
30 - "imgId": "" 34 + "imgId": "0"
31 }, { 35 }, {
32 "url": { 36 "url": {
33 "action": "", 37 "action": "",
@@ -35,11 +39,13 @@ var Button = [ @@ -35,11 +39,13 @@ var Button = [
35 }, 39 },
36 "alt": "", 40 "alt": "",
37 "src": "", 41 "src": "",
38 - "imgId": "" 42 + "imgId": "1"
39 }] 43 }]
40 }, 44 },
41 { 45 {
42 template_intro: "焦点图", 46 template_intro: "焦点图",
  47 + button_name:"焦点图",
  48 + dialog:"focus-template",
43 template_name: "focus", 49 template_name: "focus",
44 data: [ 50 data: [
45 { 51 {
@@ -47,14 +53,15 @@ var Button = [ @@ -47,14 +53,15 @@ var Button = [
47 "alt": "", 53 "alt": "",
48 "url": {}, 54 "url": {},
49 "bgColor": "", 55 "bgColor": "",
50 - "imgId": "0"  
51 } 56 }
52 ], 57 ],
53 focus_type: "1" 58 focus_type: "1"
54 }, 59 },
55 { 60 {
56 template_intro: "添加商品", 61 template_intro: "添加商品",
  62 + button_name:"添加商品",
57 template_name: "goods", 63 template_name: "goods",
  64 + dialog:"template_dialog_goods",
58 data: [ 65 data: [
59 // { 66 // {
60 // src:"", 67 // src:"",
@@ -63,8 +70,10 @@ var Button = [ @@ -63,8 +70,10 @@ var Button = [
63 ] 70 ]
64 }, 71 },
65 { 72 {
66 - template_intro: "推荐商品组", 73 + template_intro: "添加商品组",
  74 + button_name:"添加商品组",
67 template_name: "goodsGroup", 75 template_name: "goodsGroup",
  76 + dialog:"template_dialog_remgoods",
68 data: [ 77 data: [
69 { 78 {
70 cover: {cover: "", maxSortId: ""}, 79 cover: {cover: "", maxSortId: ""},
@@ -80,7 +89,9 @@ var Button = [ @@ -80,7 +89,9 @@ var Button = [
80 }, 89 },
81 { 90 {
82 "template_name": "appIconList", 91 "template_name": "appIconList",
83 - "template_intro": "图标入口", 92 + button_name:"图标入口",
  93 + "template_intro": "图标",
  94 + dialog:"icon-template",
84 "data": [ 95 "data": [
85 { 96 {
86 "url": { 97 "url": {
@@ -94,8 +105,10 @@ var Button = [ @@ -94,8 +105,10 @@ var Button = [
94 ] 105 ]
95 }, 106 },
96 { 107 {
97 - template_intro: "推荐(1T-1L-4R)", 108 + button_name:"推荐(1T-1L-4R)",
  109 + template_intro: "一张大图一个大的推荐和4个小图推荐",
98 template_name: "recommendContentOne", 110 template_name: "recommendContentOne",
  111 + dialog:"recommendContent-template",
99 "data": { 112 "data": {
100 "title": { 113 "title": {
101 "name": "", 114 "name": "",
@@ -147,13 +160,23 @@ var Button = [ @@ -147,13 +160,23 @@ var Button = [
147 "action": "", 160 "action": "",
148 "url": "" 161 "url": ""
149 } 162 }
  163 + },
  164 + {
  165 + "src": "",
  166 + "title": "",
  167 + "url": {
  168 + "action": "",
  169 + "url": ""
  170 + }
150 } 171 }
151 ] 172 ]
152 } 173 }
153 }, 174 },
154 { 175 {
155 - template_intro: "推荐(1T-6F)", 176 + button_name: "推荐(1T-6F)",
156 template_name: "recommendContentTwo", 177 template_name: "recommendContentTwo",
  178 + template_intro: "一张大图和6个小图推荐",
  179 + dialog:"recommendContent-template",
157 "data": { 180 "data": {
158 "title": { 181 "title": {
159 "name": "", 182 "name": "",
@@ -226,8 +249,10 @@ var Button = [ @@ -226,8 +249,10 @@ var Button = [
226 } 249 }
227 }, 250 },
228 { 251 {
  252 + button_name: "标题广告",
229 "template_name": "singleNameImage", 253 "template_name": "singleNameImage",
230 - "template_intro": "标题广告", 254 + "template_intro": "带标题的图片广告",
  255 + dialog:"singleNameImage-template",
231 "data": { 256 "data": {
232 "title": "", 257 "title": "",
233 "src": "", 258 "src": "",
@@ -239,8 +264,10 @@ var Button = [ @@ -239,8 +264,10 @@ var Button = [
239 } 264 }
240 }, 265 },
241 { 266 {
242 - template_intro: "推荐(1T-12F)", 267 + button_name: "推荐(1T-12F)",
  268 + template_intro: "一张大图12个小图推荐",
243 template_name: "recommendContentThree", 269 template_name: "recommendContentThree",
  270 + dialog:"recommendContent-template",
244 "data": { 271 "data": {
245 "big_image": [ 272 "big_image": [
246 { 273 {
@@ -353,18 +380,24 @@ var Button = [ @@ -353,18 +380,24 @@ var Button = [
353 } 380 }
354 }, 381 },
355 { 382 {
  383 + button_name: "潮人搭配",
356 template_intro: "潮人搭配", 384 template_intro: "潮人搭配",
357 template_name: "trendsetterCollocation", 385 template_name: "trendsetterCollocation",
  386 + dialog:"noEdit-template",
358 data: {} 387 data: {}
359 }, 388 },
360 { 389 {
  390 + button_name: "潮品话题",
361 template_intro: "潮品话题", 391 template_intro: "潮品话题",
362 template_name: "trendgoodsTopic", 392 template_name: "trendgoodsTopic",
  393 + dialog:"noEdit-template",
363 data: {} 394 data: {}
364 }, 395 },
365 { 396 {
  397 + button_name: "推荐品牌",
366 template_intro: "推荐品牌", 398 template_intro: "推荐品牌",
367 template_name: "appHotBrands", 399 template_name: "appHotBrands",
  400 + dialog:"brands-template",
368 "data": { 401 "data": {
369 "title": { 402 "title": {
370 "title": "" 403 "title": ""
@@ -374,8 +407,10 @@ var Button = [ @@ -374,8 +407,10 @@ var Button = [
374 } 407 }
375 }, 408 },
376 { 409 {
  410 + button_name: "自定义品牌",
377 template_intro: "自定义品牌", 411 template_intro: "自定义品牌",
378 template_name: "customBrands", 412 template_name: "customBrands",
  413 + dialog:"brands-template",
379 "data": { 414 "data": {
380 "title": { 415 "title": {
381 "title": "", 416 "title": "",
@@ -386,22 +421,28 @@ var Button = [ @@ -386,22 +421,28 @@ var Button = [
386 } 421 }
387 }, 422 },
388 { 423 {
  424 + button_name: "一个链接",
389 template_intro: "一个链接", 425 template_intro: "一个链接",
390 template_name: "link", 426 template_name: "link",
  427 + dialog:"template_dialog_link",
391 data: [ 428 data: [
392 {"url": {"action": "", "url": ""}} 429 {"url": {"action": "", "url": ""}}
393 ] 430 ]
394 }, 431 },
395 { 432 {
396 - template_intro: "添加促销", 433 + button_name: "添加促销",
  434 + template_intro: "促销专区",
397 template_name: "promotion", 435 template_name: "promotion",
  436 + dialog:"promotion-template",
398 data: { 437 data: {
399 "promotionId": "" 438 "promotionId": ""
400 } 439 }
401 }, 440 },
402 { 441 {
  442 + button_name: "轮播banner",
403 template_intro: "轮播banner", 443 template_intro: "轮播banner",
404 template_name: "carouselBanner", 444 template_name: "carouselBanner",
  445 + dialog:"carouselBanner-template",
405 "data": { 446 "data": {
406 "speed": "", 447 "speed": "",
407 "list": [ 448 "list": [
@@ -413,8 +454,10 @@ var Button = [ @@ -413,8 +454,10 @@ var Button = [
413 } 454 }
414 }, 455 },
415 { 456 {
  457 + button_name: "kids推荐品牌",
416 template_intro: "kids推荐品牌", 458 template_intro: "kids推荐品牌",
417 template_name: "kidsBrands", 459 template_name: "kidsBrands",
  460 + dialog:"brands-template",
418 "data": { 461 "data": {
419 "params": { 462 "params": {
420 "param": "", 463 "param": "",
@@ -430,8 +473,10 @@ var Button = [ @@ -430,8 +473,10 @@ var Button = [
430 } 473 }
431 }, 474 },
432 { 475 {
  476 + button_name: "推荐(L1-RT1-RF2)",
433 template_intro: "推荐(L1-RT1-RF2)", 477 template_intro: "推荐(L1-RT1-RF2)",
434 template_name: "recommendContentFour", 478 template_name: "recommendContentFour",
  479 + dialog:"recommendContentFour-template",
435 "data": { 480 "data": {
436 "left": { 481 "left": {
437 "title": "", 482 "title": "",
@@ -478,8 +523,10 @@ var Button = [ @@ -478,8 +523,10 @@ var Button = [
478 } 523 }
479 }, 524 },
480 { 525 {
  526 + button_name: "添加楼层",
481 template_intro: "添加楼层", 527 template_intro: "添加楼层",
482 template_name: "addfloor", 528 template_name: "addfloor",
  529 + dialog:"icon-template",
483 data: [ 530 data: [
484 { 531 {
485 "url": {}, 532 "url": {},
@@ -491,8 +538,10 @@ var Button = [ @@ -491,8 +538,10 @@ var Button = [
491 ] 538 ]
492 }, 539 },
493 { 540 {
494 - template_intro: "推荐(标题 + 12张图)", 541 + button_name: "推荐(标题 + 12张图)",
  542 + template_intro: "带标题的12个小图推荐",
495 template_name: "recommendContentFive", 543 template_name: "recommendContentFive",
  544 + dialog:"recommendContent-template",
496 data: { 545 data: {
497 "title": { 546 "title": {
498 "title": "", 547 "title": "",
@@ -599,13 +648,16 @@ var Button = [ @@ -599,13 +648,16 @@ var Button = [
599 } 648 }
600 }, 649 },
601 { 650 {
602 - template_intro: "文本导航", 651 + button_name: "文本导航",
  652 + template_intro: "文本链接",
603 template_name: "textNav", 653 template_name: "textNav",
  654 + dialog:"textNav-template",
604 data: [] 655 data: []
605 }, 656 },
606 { 657 {
607 - template_intro: "图片列表", 658 + button_name:"图片列表",
608 template_name: "imageList", 659 template_name: "imageList",
  660 + dialog:"imageList-template",
609 "data": { 661 "data": {
610 "title": { 662 "title": {
611 "title": "", 663 "title": "",
@@ -616,8 +668,10 @@ var Button = [ @@ -616,8 +668,10 @@ var Button = [
616 } 668 }
617 }, 669 },
618 { 670 {
  671 + button_name:"标题标签",
619 template_intro: "标题标签", 672 template_intro: "标题标签",
620 template_name: "title", 673 template_name: "title",
  674 + dialog:"title-template",
621 "data": { 675 "data": {
622 "title_name": "", 676 "title_name": "",
623 "more_name": "", 677 "more_name": "",
@@ -637,8 +691,10 @@ var Button = [ @@ -637,8 +691,10 @@ var Button = [
637 } 691 }
638 }, 692 },
639 { 693 {
  694 + button_name:"编辑推荐",
640 template_intro: "编辑推荐", 695 template_intro: "编辑推荐",
641 template_name: "editorTalk", 696 template_name: "editorTalk",
  697 + dialog:"editorTalk-template",
642 "data": { 698 "data": {
643 "title": { 699 "title": {
644 "title": "", 700 "title": "",
@@ -648,8 +704,10 @@ var Button = [ @@ -648,8 +704,10 @@ var Button = [
648 } 704 }
649 }, 705 },
650 { 706 {
  707 + button_name:"热门品类",
651 template_intro: "热门品类", 708 template_intro: "热门品类",
652 template_name: "hotCategory", 709 template_name: "hotCategory",
  710 + dialog:"hotCategory-template",
653 "data": { 711 "data": {
654 "title": { 712 "title": {
655 "name": "", 713 "name": "",
@@ -750,8 +808,10 @@ var Button = [ @@ -750,8 +808,10 @@ var Button = [
750 } 808 }
751 }, 809 },
752 { 810 {
753 - template_intro: "有序焦点", 811 + button_name:"有序焦点",
  812 + template_intro: "三张左图两张右图多张中间图",
754 template_name: "debrisSlider", 813 template_name: "debrisSlider",
  814 + dialog:"debrisSlider-template",
755 "data": { 815 "data": {
756 "big_image": [ 816 "big_image": [
757 { 817 {
@@ -768,8 +828,10 @@ var Button = [ @@ -768,8 +828,10 @@ var Button = [
768 } 828 }
769 }, 829 },
770 { 830 {
  831 + button_name:"新人专享",
771 template_intro: "新人专享", 832 template_intro: "新人专享",
772 template_name: "newUserFloor", 833 template_name: "newUserFloor",
  834 + dialog:"newUserFloor-template",
773 data: { 835 data: {
774 "title": { 836 "title": {
775 "name": "", 837 "name": "",
@@ -793,8 +855,10 @@ var Button = [ @@ -793,8 +855,10 @@ var Button = [
793 } 855 }
794 }, 856 },
795 { 857 {
796 - template_intro: "图片广告", 858 + button_name:"图片广告",
  859 + template_intro: "带标题的图片广告",
797 template_name: "imageGroup", 860 template_name: "imageGroup",
  861 + dialog:"imageGroup-template",
798 data: { 862 data: {
799 "title": "", 863 "title": "",
800 "more": "", 864 "more": "",
@@ -814,8 +878,10 @@ var Button = [ @@ -814,8 +878,10 @@ var Button = [
814 } 878 }
815 }, 879 },
816 { 880 {
817 - template_intro: "自定义参数", 881 + button_name:"自定义参数",
  882 + template_intro: "参数集合",
818 template_name: "paramsGroup", 883 template_name: "paramsGroup",
  884 + dialog:"paramsGroup-template",
819 data: { 885 data: {
820 "title": "", 886 "title": "",
821 "more": "", 887 "more": "",
@@ -829,17 +895,23 @@ var Button = [ @@ -829,17 +895,23 @@ var Button = [
829 } 895 }
830 }, 896 },
831 { 897 {
  898 + button_name:"自定义参数图片",
832 template_intro: "自定义参数图片", 899 template_intro: "自定义参数图片",
833 template_name: "", 900 template_name: "",
  901 + dialog:"noEdit-template",
834 data: {} 902 data: {}
835 }, 903 },
836 { 904 {
  905 + button_name:"站内公告",
837 template_intro: "站内公告", 906 template_intro: "站内公告",
838 - template_name: "announcement" 907 + template_name: "announcement",
  908 + dialog:"noEdit-template"
839 }, 909 },
840 { 910 {
  911 + button_name:"标题图片",
841 template_intro: "标题图片", 912 template_intro: "标题图片",
842 template_name: "titleImage", 913 template_name: "titleImage",
  914 + dialog:"titleImage-template",
843 data: { 915 data: {
844 "title": "", 916 "title": "",
845 "more_name": "", 917 "more_name": "",
@@ -857,8 +929,10 @@ var Button = [ @@ -857,8 +929,10 @@ var Button = [
857 } 929 }
858 }, 930 },
859 { 931 {
  932 + button_name:"多标签图片",
860 template_intro: "多标签图片", 933 template_intro: "多标签图片",
861 template_name: "multiLabelImage", 934 template_name: "multiLabelImage",
  935 + dialog:"multiLabelImage-template",
862 data: { 936 data: {
863 "label": [ 937 "label": [
864 { 938 {
@@ -881,8 +955,10 @@ var Button = [ @@ -881,8 +955,10 @@ var Button = [
881 } 955 }
882 }, 956 },
883 { 957 {
  958 + button_name:"搭配(2T-nF)",
884 template_intro: "搭配(2T-nF)", 959 template_intro: "搭配(2T-nF)",
885 template_name: "matchImage", 960 template_name: "matchImage",
  961 + dialog:"matchImage-template",
886 data: { 962 data: {
887 "title": { 963 "title": {
888 "name": "", 964 "name": "",
@@ -934,8 +1010,10 @@ var Button = [ @@ -934,8 +1010,10 @@ var Button = [
934 } 1010 }
935 }, 1011 },
936 { 1012 {
  1013 + button_name:"领券频道",
937 "template_name": "getCoupon", 1014 "template_name": "getCoupon",
938 "template_intro": "领券频道", 1015 "template_intro": "领券频道",
  1016 + dialog:"getCoupon-template",
939 "data": [ 1017 "data": [
940 { 1018 {
941 "title": "", 1019 "title": "",
  1 +/**
  2 + * Created by ty on 2016/4/15.
  3 + */
  4 +
  5 +var resourceObj = {
  6 + focus:""
  7 +};
@@ -19,45 +19,6 @@ var edit = new common.edit(".modal-body", { @@ -19,45 +19,6 @@ var edit = new common.edit(".modal-body", {
19 bucket: "yhb-img01" 19 bucket: "yhb-img01"
20 }); 20 });
21 21
22 -var tempArr = [];  
23 -tempArr["text"] = "template_dialog_text";  
24 -tempArr["singleImage"] = "template_dialog_grid";  
25 -tempArr["smallPic"] = "template_dialog_grid";  
26 -tempArr["focus"] = "focus-template";  
27 -tempArr["goods"] = "template_dialog_goods";  
28 -tempArr["goodsGroup"] = "template_dialog_remgoods";  
29 -tempArr["appIconList"] = "icon-template";  
30 -tempArr["recommendContentOne"] = "recommendContent-template";  
31 -tempArr["recommendContentTwo"] = "recommendContent-template";  
32 -tempArr["singleNameImage"] = "singleNameImage-template";  
33 -tempArr["recommendContentThree"] = "recommendContent-template";  
34 -tempArr["trendsetterCollocation"] = "noEdit-template";  
35 -tempArr["trendgoodsTopic"] = "noEdit-template";  
36 -tempArr["appHotBrands"] = "brands-template";  
37 -tempArr["customBrands"] = "brands-template";  
38 -tempArr["link"] = "template_dialog_link";  
39 -tempArr["promotion"] = "promotion-template";  
40 -tempArr["carouselBanner"] = "carouselBanner-template";  
41 -tempArr["kidsBrands"] = "brands-template";  
42 -tempArr["recommendContentFour"] = "recommendContentFour-template";  
43 -tempArr["addfloor"] = "icon-template";  
44 -tempArr["recommendContentFive"] = "recommendContent-template";  
45 -tempArr["textNav"] = "textNav-template";  
46 -tempArr["imageList"] = "imageList-template";  
47 -tempArr["title"] = "title-template";  
48 -tempArr["editorTalk"] = "editorTalk-template";  
49 -tempArr["hotCategory"] = "hotCategory-template";  
50 -tempArr["debrisSlider"] = "debrisSlider-template";  
51 -tempArr["newUserFloor"] = "newUserFloor-template";  
52 -tempArr["imageGroup"] = "imageGroup-template";  
53 -tempArr["paramsGroup"] = "paramsGroup-template";  
54 -tempArr["自定义参数图片"] = "noEdit-template";  
55 -tempArr["announcement"] = "noEdit-template";  
56 -tempArr["titleImage"] = "titleImage-template";  
57 -tempArr["multiLabelImage"] = "multiLabelImage-template";  
58 -tempArr["matchImage"] = "matchImage-template";  
59 -tempArr["getCoupon"] = "getCoupon-template";  
60 -  
61 var Bll = { 22 var Bll = {
62 Brands: [], 23 Brands: [],
63 Brands1: {}, 24 Brands1: {},
@@ -68,20 +29,29 @@ var Bll = { @@ -68,20 +29,29 @@ var Bll = {
68 $(selecter).html(common.util.__template2($("#" + templater).html(), data)); 29 $(selecter).html(common.util.__template2($("#" + templater).html(), data));
69 }, 30 },
70 toast: function (index, module) { 31 toast: function (index, module) {
  32 + var btn = Button.filter(function (item) {
  33 + return item.template_name == module.contentData.template_name;
  34 + });
71 var d = new common.dialog({ 35 var d = new common.dialog({
72 - title: (!!~index ? "修改" : "添加") + module.contentData.template_intro, 36 + title: (!!~index ? "修改" : "添加") + module.contentData.button_name,
73 //content: common.util.__template2($("#" + module.contentData.dialog).html(), module), 37 //content: common.util.__template2($("#" + module.contentData.dialog).html(), module),
74 - content: common.util.__template2($("#" + tempArr[module.contentData.template_name]).html(), module), 38 + content: common.util.__template2($("#" + btn[0].dialog).html(), module),
75 width: '70%', 39 width: '70%',
76 button: [{ 40 button: [{
77 value: "保存", 41 value: "保存",
78 callback: function () { 42 callback: function () {
  43 +
79 if (edit.validate()) { 44 if (edit.validate()) {
80 //TODO 45 //TODO
  46 + //if(CMDData(module.contentData.tmep_key)){
  47 + // module=CMDData(module.contentData.tmep_key)(module)
  48 + //}
  49 +
81 !!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module); 50 !!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
82 Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas}); 51 Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
83 d.close(); 52 d.close();
84 } 53 }
  54 + console.log(module);
85 return false; 55 return false;
86 }, 56 },
87 css: "btn-primary" 57 css: "btn-primary"
@@ -122,10 +92,12 @@ var Bll = { @@ -122,10 +92,12 @@ var Bll = {
122 }); 92 });
123 for (var i in Brand) { 93 for (var i in Brand) {
124 Brand[i].sort(function (a, b) { 94 Brand[i].sort(function (a, b) {
125 - var aName = a.brand_name.toLowerCase(),  
126 - bName = b.brand_name.toLowerCase();  
127 - if (aName < bName) return -1;  
128 - if (aName > bName) return 1; 95 + if(a.brand_name && b.brand_name) {
  96 + var aName = a.brand_name.toLowerCase(),
  97 + bName = b.brand_name.toLowerCase();
  98 + if (aName < bName) return -1;
  99 + if (aName > bName) return 1;
  100 + }
129 return 0; 101 return 0;
130 }); 102 });
131 Bll.Brands.push({ 103 Bll.Brands.push({
@@ -255,6 +227,12 @@ $(document).on("change", ".observe", function () { @@ -255,6 +227,12 @@ $(document).on("change", ".observe", function () {
255 }); 227 });
256 }); 228 });
257 229
  230 +var clickBtns = {
  231 + multiLabelImage:{
  232 +
  233 + }
  234 +};
  235 +
258 $(document).on("click", '#multiLabelImage-addImage', function () { 236 $(document).on("click", '#multiLabelImage-addImage', function () {
259 Bll.module.contentData.data.image.push({ 237 Bll.module.contentData.data.image.push({
260 "src": "", 238 "src": "",
@@ -556,7 +534,6 @@ $(document).on("click", '#focus-addOne', function () { @@ -556,7 +534,6 @@ $(document).on("click", '#focus-addOne', function () {
556 "alt": "", 534 "alt": "",
557 "url": {}, 535 "url": {},
558 "bgColor": "", 536 "bgColor": "",
559 - "imgId": "0"  
560 } 537 }
561 ); 538 );
562 Bll.renderDialog("focus-template"); 539 Bll.renderDialog("focus-template");
@@ -619,6 +596,8 @@ $(document).on("click", "#sub_btn", function () { @@ -619,6 +596,8 @@ $(document).on("click", "#sub_btn", function () {
619 var action; 596 var action;
620 var url; 597 var url;
621 addSuffix(contentData); 598 addSuffix(contentData);
  599 + delete contentData.button_name;
  600 + delete contentData.dialog;
622 if (contentData.template_name == "kidsBrands") { 601 if (contentData.template_name == "kidsBrands") {
623 action = contentData.data.params.more_url.action || ""; 602 action = contentData.data.params.more_url.action || "";
624 url = contentData.data.params.more_url.url || ""; 603 url = contentData.data.params.more_url.url || "";
@@ -630,7 +609,6 @@ $(document).on("click", "#sub_btn", function () { @@ -630,7 +609,6 @@ $(document).on("click", "#sub_btn", function () {
630 contentData.data.more_link = "{\"action\":\"" + action + "\",\"url\":\"" + url + "\"}"; 609 contentData.data.more_link = "{\"action\":\"" + action + "\",\"url\":\"" + url + "\"}";
631 } 610 }
632 data.content[i] = JSON.stringify(common.util.__ArrayToObj(contentData)); 611 data.content[i] = JSON.stringify(common.util.__ArrayToObj(contentData));
633 - data.content[i] = JSON.stringify(common.util.__ArrayToObj(Bll.contentDatas[i].contentData));  
634 if (Bll.contentDatas[i].id) { 612 if (Bll.contentDatas[i].id) {
635 data.data_id[i] = "id_" + Bll.contentDatas[i].id; 613 data.data_id[i] = "id_" + Bll.contentDatas[i].id;
636 } 614 }
@@ -730,8 +708,7 @@ $(document).on("click", "#goodsSelectBtn", function () { @@ -730,8 +708,7 @@ $(document).on("click", "#goodsSelectBtn", function () {
730 Bll.module.contentData.data = goodsgird.selected.map(function (item, index) { 708 Bll.module.contentData.data = goodsgird.selected.map(function (item, index) {
731 return { 709 return {
732 src: item.images_url, 710 src: item.images_url,
733 - id: item.product_skn,  
734 - product_skc: item.product_skc 711 + id: item.product_skn
735 } 712 }
736 }); 713 });
737 // Bll.module.data=goodsgird.selected; 714 // Bll.module.data=goodsgird.selected;
@@ -765,7 +742,6 @@ $(document).on("click", ".goodsSelectBtn", function () { @@ -765,7 +742,6 @@ $(document).on("click", ".goodsSelectBtn", function () {
765 Bll.module.contentData.data[index].list[i] = { 742 Bll.module.contentData.data[index].list[i] = {
766 src: item.images_url, 743 src: item.images_url,
767 id: item.product_skn, 744 id: item.product_skn,
768 - product_skc: item.product_skc,  
769 maxSortId: item.max_sort_id 745 maxSortId: item.max_sort_id
770 }; 746 };
771 if (!i) { 747 if (!i) {
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 <!-- 按钮 --> 45 <!-- 按钮 -->
46 <script type="text/template" id="template_content_btns"> 46 <script type="text/template" id="template_content_btns">
47 [[each btns as btn index]] 47 [[each btns as btn index]]
48 - <li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.template_intro]]</a></li> 48 + <li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.button_name]]</a></li>
49 [[/each]] 49 [[/each]]
50 </script> 50 </script>
51 51
@@ -443,7 +443,7 @@ @@ -443,7 +443,7 @@
443 <table style="width:100%;z-index:-1;"> 443 <table style="width:100%;z-index:-1;">
444 <tbody> 444 <tbody>
445 <tr> 445 <tr>
446 - <td width="100px">标题:<input class="abc" type="text" required style="width: 60px;" class="observe" value="[[item.title]]" data-field="list.[[index]].title"></td> 446 + <td width="100px">标题:<input type="text" required style="width: 60px;" class="observe" value="[[item.title]]" data-field="list.[[index]].title"></td>
447 <td>参数:<input type="text" style="width:300px;" class="observe" value="[[item.params]]" data-field="list.[[index]].params"></td> 447 <td>参数:<input type="text" style="width:300px;" class="observe" value="[[item.params]]" data-field="list.[[index]].params"></td>
448 <td><button class="btn btn-danger btn-sm paramsGroupDel" type="button" data-index="[[index]]">删除</button></td> 448 <td><button class="btn btn-danger btn-sm paramsGroupDel" type="button" data-index="[[index]]">删除</button></td>
449 </tr> 449 </tr>
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 [[each contentData.data as item index]] 76 [[each contentData.data as item index]]
77 <tr> 77 <tr>
78 <td>[[index+1]]</td> 78 <td>[[index+1]]</td>
79 - <td><input type="file" name="file" id="src-[[index]]" value="[[item.src]]" data-field="[[index]].src" data-index="[[index]]" /></td> 79 + <td><input type="file" name="file" id="src-[[index]]" value="[[item.src]]" data-field="[[index]].src" data-index="[[index]]" required/></td>
80 <td> 80 <td>
81 <div class="form-group"> 81 <div class="form-group">
82 <div class="col-sm-10"> 82 <div class="col-sm-10">