/*! For license information please see 9.666a3266.chunk.js.LICENSE.txt */ (this.webpackJsonpmarketingsystem=this.webpackJsonpmarketingsystem||[]).push([[9],{453:function(e,t,o){},454:function(e,t,o){},498:function(e,t,o){"use strict";o.r(t),o.d(t,"default",(function(){return ve}));var i=o(70),a=o(71),c=o(24),s=o(25),n=o(28),l=o(26),r=o(27),d=o(60),u=(o(39),o(74)),h=o(452),m=o.n(h),b=o(468),f=o(494),p=o(502),g=o(0),j=o.n(g),x=o(402),v=o(184),O=o(208),C=o(210),y=o(220),_=o(249),S=o(380),N=o(497),k=o(302),w=o(174),E=o(501),A=(o(92),o(64)),F=o(106),T=o.n(F),U=o(1),I=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).state={editorHtml:""},i}return Object(s.a)(o,[{key:"componentDidMount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=this,o=new T.a("#wangeditorDom");this.setState({editor:o}),o.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],o.config.pasteText=!0,o.config.height=200,o.config.menus=["bold","foreColor","italic","indent","link","justify"],o.config.onchange=function(e){var i=o.txt.text();if(0==i.length&&t.props.setEdittext(""),i.length>1e3){var a=i.slice(0,1e3);return t.setState({editorHtml:a}),o.txt.html(a),void t.props.setEdittext(a)}t.setState({editorHtml:e}),t.props.setEdittext(e)},o.create();var i="",a=e.exchangeList;"landeditor"==this.props.pageType&&(i=e&&a?a.land.describe.content:""),["goodeditor","goodsuseditor"].includes(this.props.pageType)&&(i=e&&a&&a.product_list?a.product_list.describe.content:""),["detaileditor","detailsuseditor"].includes(this.props.pageType)&&(i=e&&a&&a.product_detail?a.product_detail.describe.content:""),o.txt.html(i)}},{key:"render",value:function(){return Object(U.jsx)("div",{id:"wangeditorDom"})}}]),o}(j.a.Component),D=o(63),z=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.setGoodDetailConfig({attr:e,value:t})},i.onUpload=function(e,t){return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={model:{font_color:"#ffffff",button_color:"#FACD6A",describe:{type:"",content:" ",bg_image:""}}},i}return Object(s.a)(o,[{key:"onactivityChange",value:function(e,t){var o=this.state.model;o.describe[e]=t.target.value,this.setState({model:o}),this.props.setdetailActive({attr:e,value:t.target.value})}},{key:"getsusEditext",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setdetailActive({attr:"content",value:e})}},{key:"onUploadChange",value:function(e){var t=this.state.model;t.describe.bg_image="",this.props.setdetailActive({attr:"bg_image",value:""}),e.length>0&&"success"==e[0].status&&(t.describe.bg_image=e[0].src,this.props.setdetailActive({attr:"bg_image",value:e[0].src})),this.setState({model:t})}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",this.setState({model:t}),this.props.setdetailActive({attr:"type",value:""}))}},{key:"componentWillMount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig"));e&&e.exchangeList&&e.exchangeList.product_detail&&this.setState({model:e.exchangeList.product_detail})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.exchangeList;t.product_detail=this.state.model,e.exchangeList=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)("div",{style:{fontWeight:"bold",marginBottom:"20px"},children:"\u6837\u5f0f"}),Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.font_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("font_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}),Object(U.jsx)(D.a,{labelname:"\u6309\u94ae\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.button_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("button_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.button_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("button_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.button_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("button_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.button_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("button_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.button_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("button_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.button_color,onChange:function(t){return e.controlColor("button_color",t)}})})]})}),Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsxs)("div",{className:"activeTip",children:[Object(U.jsx)(D.a,{required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.onactivityChange("type",t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(1)},value:"1",children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(2)},value:"2",children:"\u60ac\u6d6e"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(3)},value:"3",children:"\u5bcc\u6587\u672c"})]})}),Object(U.jsx)(k.a,{trigger:"hover",position:"top-left",title:"\u975e\u5fc5\u9009\u9879\uff0c\u5706\u5f62\u7ec4\u4ef6\u60ac\u6d6e\uff0c\u9002\u7528\u4e8e\u957f\u6587\u672c",children:Object(U.jsx)(w.a,{type:"help-circle",className:"imgTip"})})]}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):2==this.state.model.describe.type?Object(U.jsx)(I,{pageType:"detailsuseditor",setEdittext:function(t){return e.getsusEditext(t)}}):3==this.state.model.describe.type?Object(U.jsx)(I,{pageType:"detaileditor",setEdittext:function(t){return e.getsusEditext(t)}}):null]})})}}]),o}(j.a.Component),L=o(62),M=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.setGoodConfig({attr:e,value:t})},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={model:{top_image:"",list:"2",font_color:"#ffffff",button_color:"#FACD6A",describe:{type:"",content:"",bg_image:""}}},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));this.setState({model:t.exchangeList.product_list})}},{key:"configChange",value:function(e,t){var o=this.state.model;o[e]=t,this.setState({model:o}),this.props.setGoodConfig({attr:e,value:t})}},{key:"explainChange",value:function(e,t){var o=this.state.model;o.describe[e]=t.target.value,this.setState({model:o}),this.props.setexplainConfig({attr:e,value:t.target.value})}},{key:"getsusEditext",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setexplainConfig({attr:"content",value:e})}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",this.setState({model:t}),this.props.setexplainConfig({attr:"type",value:""}))}},{key:"onUploadChange",value:function(e){var t=this.state.model;t.top_image="",this.props.setGoodConfig({attr:"top_image",value:""}),e.length>0&&"success"==e[0].status&&(t.top_image=e[0].src,this.props.setGoodConfig({attr:"top_image",value:e[0].src})),this.setState({model:t})}},{key:"onUploadChange2",value:function(e){var t=this.state.model;t.describe.bg_image="",this.props.setexplainConfig({attr:"bg_image",value:""}),e.length>0&&"success"==e[0].status&&(t.describe.bg_image=e[0].src,this.props.setexplainConfig({attr:"bg_image",value:e[0].src})),this.setState({model:t})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig"));if(e&&e.exchangeList){var t=e.exchangeList;t.product_list=this.state.model,e.exchangeList=t}else{e={};var o={};o.product_list=this.state.model,e.exchangeList=o}sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u57fa\u7840\u8bbe\u7f6e"}),Object(U.jsx)(D.a,{labelname:"banner\u5916\u94fe:",required:!1,labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){e.configChange("bannerUrl",t)},onClearItem:function(){e.configChange("bannerUrl","")},value:this.state.model.bannerUrl,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",height:"36px",width:"300px",alignment:"left",countShow:!1})}),Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u6837\u5f0f"}),Object(U.jsx)("div",{style:{marginBottom:"24px"},children:Object(U.jsx)(D.a,{labelname:"",labelwidth:"0px",required:!1,children:Object(U.jsxs)(O.a,{onChange:function(t){e.configChange("list",t.target.value)},value:this.state.model.list,children:[Object(U.jsx)(C.a,{value:"2",children:"\u8f6e\u64ad"}),Object(U.jsx)(C.a,{value:"1",children:"\u5217\u8868"}),Object(U.jsx)(C.a,{value:"3",children:"\u77e9\u9635"})]})})}),2==this.state.model.list?Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",style:{border:"1px solid #f1f2f3"},onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.font_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("font_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}):null,2==this.state.model.list?Object(U.jsx)(D.a,{labelname:"\u6309\u94ae\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{className:"#ffffff"==this.state.model.button_color?"cicle activecicle":"cicle",style:{border:"1px solid #f1f2f3"},onClick:function(){e.controlColor("button_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.button_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("button_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.button_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("button_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.button_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("button_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.button_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("button_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.button_color,onChange:function(t){return e.controlColor("button_color",t)}})})]})}):null,Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsx)(D.a,{labelname:"\u9876\u90e8banner:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,defaultFileList:this.state.model.top_image?[{src:this.state.model.top_image}]:null,onError:this.onUploadError})}),Object(U.jsxs)("div",{className:"activeTip",children:[Object(U.jsx)(D.a,{required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.explainChange("type",t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(1)},value:"1",children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(2)},value:"2",children:"\u60ac\u6d6e"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(3)},value:"3",children:"\u5bcc\u6587\u672c"})]})}),Object(U.jsx)(k.a,{trigger:"hover",position:"top-left",title:"\u975e\u5fc5\u9009\u9879\uff0c\u5706\u5f62\u7ec4\u4ef6\u60ac\u6d6e\uff0c\u9002\u7528\u4e8e\u957f\u6587\u672c",children:Object(U.jsx)(w.a,{type:"help-circle",className:"imgTip"})})]}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):2==this.state.model.describe.type?Object(U.jsx)(I,{pageType:"goodsuseditor",setEdittext:function(t){return e.getsusEditext(t)}}):3==this.state.model.describe.type?Object(U.jsx)(I,{pageType:"goodeditor",setEdittext:function(t){return e.getsusEditext(t)}}):null]})})}}]),o}(j.a.Component),W=o(510),J=o(291),B=(o(116),function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.landConfig({attr:e,value:t})},i.onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={isSystemModel:!1,mouldWay:[],model:{title:"\u843d\u5730\u9875\u6807\u9898",top_image:"",middle_image:"",describe:{type:"",content:"",bg_image:""},bg_color:"#EEEEEE",font_color:"#000000",sort:1,type_id:{key:1,text:"\u901a\u7528"}}},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=this,o=JSON.parse(sessionStorage.getItem("editorConfig")),i=sessionStorage.getItem("mouldType");if(i&&0==i&&(this.setState({isSystemModel:!0}),Object(d.Lb)().then((function(e){Object(d.Yb)(e,(function(o,i){var a=e.data.map((function(e){return{key:e.id,text:e.name}}));t.setState({mouldWay:a})}),(function(e){}))})).catch((function(e){}))),o&&o.exchangeList&&o.exchangeList.land){var a=o.exchangeList.land;this.setState({model:a})}}},{key:"onactivityChange",value:function(e){var t=this.state.model;t.describe.type=e.target.value,t.describe.bg_image&&(t.describe.bg_image=""),this.setState({model:t}),this.props.setbanner(this.state.model)}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",t.describe.type=0,this.setState({model:t}),this.props.setbanner(this.state.model))}},{key:"onmouldChange",value:function(e){var t=this.state.model;t.type_id=e,this.setState({model:t}),this.props.setbanner(t)}},{key:"onUploadChange",value:function(e){var t=this.state.model;t.top_image="",e.length>0&&"success"==e[0].status&&(t.top_image=e[0].src),this.setState({model:t}),this.props.setbanner(t)}},{key:"onUploadChange1",value:function(e){if(e.length>0&&"success"==e[0].status){var t=this.state.model;t.middle_image=e[0].src,this.setState({model:t}),this.props.setbanner(t)}else{var o=this.state.model;o.middle_image="",this.setState({model:o}),this.props.setbanner(o)}}},{key:"onUploadChange2",value:function(e){if(e.length>0&&"success"==e[0].status){var t=this.state.model;t.describe.bg_image=e[0].src,this.setState({model:t}),this.props.setbanner(t)}else{var o=this.state.model;o.describe.bg_image="",this.setState({model:o}),this.props.setbanner(o)}}},{key:"sortFn",value:function(e){var t=this.state.model;t.sort=e,this.setState({model:t}),this.props.setbanner(t)}},{key:"getEditext",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setbanner(t)}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig"));if(e&&e.exchangeList){var t=e.exchangeList;t.land=this.state.model,e.exchangeList=t}else{e={};var o={};o.land=this.state.model,e.exchangeList=o}sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{style:{width:"92%",margin:"0 auto 60px",overflow:"auto",maxHeight:"100%"},children:[Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u57fa\u7840\u8bbe\u7f6e"}),Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)(D.a,{labelname:"\u843d\u5730\u9875\u6807\u9898:",labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){var o=e.state.model;o.title=t,e.setState({model:o}),e.props.landConfig({attr:"title",value:t})},onClearItem:function(t){var o=e.state.model;o.title="",e.setState({model:o})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"300px",alignment:"left"})}),this.state.isSystemModel?Object(U.jsx)(D.a,{labelname:"\u6743\u91cd",required:!1,labelwidth:"100px",children:Object(U.jsx)(W.a,{onChange:function(t){return e.sortFn(t)},value:this.state.model.sort,placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57",integer:!0,max:999,width:"300px",className:"sort_number"})}):null,this.state.isSystemModel?Object(U.jsx)(D.a,{labelname:"\u6a21\u677f\u5206\u7c7b",labelwidth:"100px",children:Object(U.jsx)(J.a,{options:this.state.mouldWay,onChange:function(t){e.onmouldChange(t)},placeholder:"\u9009\u62e9\u4e00\u9879",width:300,value:this.state.model.type_id})}):null,Object(U.jsx)("div",{style:{marginBottom:"15px",fontWeight:"bold"},children:"\u6837\u5f0f"}),Object(U.jsx)(D.a,{labelname:"\u80cc\u666f\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.bg_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("bg_color","#ffffff")}}),Object(U.jsx)("span",{className:"#EEEEEE"==this.state.model.bg_color?"activecicle cicle cicle1":"cicle cicle1",onClick:function(){e.controlColor("bg_color","#EEEEEE")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.bg_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("bg_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.bg_color,onChange:function(t){return e.controlColor("bg_color",t)}})})]})}),Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.font_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("font_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.font_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("font_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.font_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("font_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.font_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("font_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}),Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsx)(D.a,{labelname:"\u9876\u90e8banner:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,defaultFileList:this.state.model.top_image?[{src:this.state.model.top_image}]:null,onError:this.onUploadError})}),Object(U.jsx)(D.a,{labelname:"\u8f93\u5165\u6846:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange1(t)},defaultFileList:this.state.model.middle_image?[{src:this.state.model.middle_image}]:null,onUpload:this.onUpload,onError:this.onUploadError})}),Object(U.jsx)(D.a,{myClassName:"activeSet",required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.onactivityChange(t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{value:"1",onClick:function(){return e.hasItemFn(1)},children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{value:"2",onClick:function(){return e.hasItemFn(2)},children:"\u5bcc\u6587\u672c"})]})}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):null,2==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:"\u80cc\u666f\u56fe\u6848:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):null,2==this.state.model.describe.type?Object(U.jsx)(I,{pageType:"landeditor",setEdittext:function(t){return e.getEditext(t)}}):null]})]})}}]),o}(j.a.Component)),q=o(381),H=o(382),G=o(383),P=o(384),Y=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).state={},i}return Object(s.a)(o,[{key:"render",value:function(){return Object(U.jsx)("div",{style:{width:"92%",margin:"30px auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsx)("p",{style:{textAlign:"center"},children:"\u6682\u672a\u5f00\u653e\uff01"})})}}]),o}(j.a.Component),R=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).state={editorHtml:""},i}return Object(s.a)(o,[{key:"componentDidMount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=this,o=new T.a("#wangeditorDom");this.setState({editor:o}),o.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],o.config.pasteText=!0,o.config.height=200,o.config.menus=["bold","foreColor","italic","indent","link","justify"],o.config.onchange=function(e){var i=o.txt.text();if(0==i.length&&t.props.setEdittext(""),i.length>1e3){var a=i.slice(0,1e3);return t.setState({editorHtml:a}),o.txt.html(a),void t.props.setEdittext(a)}t.setState({editorHtml:e}),t.props.setEdittext(e)},o.create();var i="",a=e.whiteList;"landeditor"==this.props.pageType&&(i=e&&a&&a.land?a.land.describe.content:""),["goodeditor","goodsuseditor"].includes(this.props.pageType)&&(i=e&&a.product_list?a.product_list.describe.content:""),["detaileditor","detailsuseditor"].includes(this.props.pageType)&&(i=e&&a.product_detail?a.product_detail.describe.content:""),o.txt.html(i)}},{key:"render",value:function(){return Object(U.jsx)("div",{id:"wangeditorDom"})}}]),o}(j.a.Component),K=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.landConfig({attr:e,value:t})},i.onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={model:{title:"\u767d\u540d\u5355\u6807\u9898",top_image:"",middle_image:"",describe:{type:"",content:"",bg_image:""},bg_color:"#EEEEEE",font_color:"#000000"}},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));if(t&&t.whiteList&&t.whiteList.land){var o=t.whiteList.land;this.setState({model:o})}}},{key:"onactivityChange",value:function(e){var t=this.state.model;t.describe.type=e.target.value,t.describe.bg_image&&(t.describe.bg_image=""),this.setState({model:t}),this.props.setbanner(this.state.model)}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",t.describe.type=0,this.setState({model:t}),this.props.setbanner(this.state.model))}},{key:"onUploadChange",value:function(e,t){var o=this.state.model;o[t]="",e.length>0&&"success"==e[0].status&&(o[t]=e[0].src),this.setState({model:o}),this.props.setbanner(o)}},{key:"onUploadChange2",value:function(e){var t=this.state.model;t.describe.bg_image="",e.length>0&&"success"==e[0].status&&(t.describe.bg_image=e[0].src),this.setState({model:t}),this.props.setbanner(t)}},{key:"getEditext",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setbanner(t)}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig"));if(e&&e.whiteList){var t=e.whiteList;t.land=this.state.model,e.whiteList=t}else{var o={};o.land=this.state.model,e.whiteList=o}sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{style:{width:"92%",margin:"0 auto 60px",overflow:"auto",maxHeight:"100%"},children:[0==this.props.mouldType?null:Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u57fa\u7840\u8bbe\u7f6e"}),Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[0==this.props.mouldType?null:Object(U.jsx)(D.a,{labelname:"\u843d\u5730\u9875\u6807\u9898:",labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){var o=e.state.model;o.title=t,e.setState({model:o}),e.props.landConfig({attr:"title",value:t})},onClearItem:function(t){var o=e.state.model;o.title="",e.setState({model:o})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"300px",alignment:"left"})}),Object(U.jsx)("div",{style:{marginBottom:"15px",fontWeight:"bold"},children:"\u6837\u5f0f"}),Object(U.jsx)(D.a,{labelname:"\u80cc\u666f\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.bg_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("bg_color","#ffffff")}}),Object(U.jsx)("span",{className:"#EEEEEE"==this.state.model.bg_color?"activecicle cicle cicle1":"cicle cicle1",onClick:function(){e.controlColor("bg_color","#EEEEEE")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.bg_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("bg_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.bg_color,onChange:function(t){return e.controlColor("bg_color",t)}})})]})}),Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.font_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("font_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.font_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("font_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.font_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("font_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.font_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("font_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}),Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsx)(D.a,{labelname:"\u9876\u90e8banner:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t,"top_image")},onUpload:this.onUpload,defaultFileList:this.state.model.top_image?[{src:this.state.model.top_image}]:null,onError:this.onUploadError})}),Object(U.jsx)(D.a,{labelname:"\u8f93\u5165\u6846:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t,"middle_image")},defaultFileList:this.state.model.middle_image?[{src:this.state.model.middle_image}]:null,onUpload:this.onUpload,onError:this.onUploadError})}),Object(U.jsx)(D.a,{myClassName:"activeSet",required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.onactivityChange(t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{value:"1",onClick:function(){return e.hasItemFn(1)},children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{value:"2",onClick:function(){return e.hasItemFn(2)},children:"\u5bcc\u6587\u672c"})]})}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):null,2==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:"\u80cc\u666f\u56fe\u6848:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):null,2==this.state.model.describe.type?Object(U.jsx)(R,{pageType:"landeditor",setEdittext:function(t){return e.getEditext(t)}}):null]})]})}}]),o}(j.a.Component),Q=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.setGoodDetailConfig({attr:e,value:t})},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={model:{font_color:"#ffffff",button_color:"#FACD6A",describe:{type:"",content:" ",bg_image:""}}},i}return Object(s.a)(o,[{key:"onactivityChange",value:function(e,t){var o=this.state.model;o.describe[e]=t.target.value,this.setState({model:o}),this.props.setdetailActive({attr:e,value:t.target.value})}},{key:"getsusEditext",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setdetailActive({attr:"content",value:e})}},{key:"onUploadChange",value:function(e){var t=this.state.model;t.describe.bg_image="",this.props.setdetailActive({attr:"bg_image",value:""}),e.length>0&&"success"==e[0].status&&(t.describe.bg_image=e[0].src,this.props.setdetailActive({attr:"bg_image",value:e[0].src})),this.setState({model:t})}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",this.setState({model:t}),this.props.setdetailActive({attr:"type",value:""}))}},{key:"componentWillMount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig"));this.setState({model:e.whiteList.product_detail})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.whiteList;t.product_detail=this.state.model,e.whiteList=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)("div",{style:{fontWeight:"bold",marginBottom:"20px"},children:"\u6837\u5f0f"}),Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.font_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("font_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}),Object(U.jsx)(D.a,{labelname:"\u6309\u94ae\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.button_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("button_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.button_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("button_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.button_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("button_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.button_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("button_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.button_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("button_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.button_color,onChange:function(t){return e.controlColor("button_color",t)}})})]})}),Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsxs)("div",{className:"activeTip",children:[Object(U.jsx)(D.a,{required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.onactivityChange("type",t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(1)},value:"1",children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(2)},value:"2",children:"\u60ac\u6d6e"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(3)},value:"3",children:"\u5bcc\u6587\u672c"})]})}),Object(U.jsx)(k.a,{trigger:"hover",position:"top-left",title:"\u975e\u5fc5\u9009\u9879\uff0c\u5706\u5f62\u7ec4\u4ef6\u60ac\u6d6e\uff0c\u9002\u7528\u4e8e\u957f\u6587\u672c",children:Object(U.jsx)(w.a,{type:"help-circle",className:"imgTip"})})]}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):2==this.state.model.describe.type?Object(U.jsx)(R,{pageType:"detailsuseditor",setEdittext:function(t){return e.getsusEditext(t)}}):3==this.state.model.describe.type?Object(U.jsx)(R,{pageType:"detaileditor",setEdittext:function(t){return e.getsusEditext(t)}}):null]})})}}]),o}(j.a.Component),V=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.setGoodConfig({attr:e,value:t})},i.state={model:{top_image:"",list:"2",font_color:"#ffffff",button_color:"#FACD6A",describe:{type:"",content:"",bg_image:""}}},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));t&&t.whiteList&&t.whiteList.product_list&&this.setState({model:t.whiteList.product_list})}},{key:"configChange",value:function(e,t){var o=this.state.model;o[e]=t,this.setState({model:o}),this.props.setGoodConfig({attr:e,value:t})}},{key:"explainChange",value:function(e,t){var o=this.state.model;o.describe[e]=t.target.value,this.setState({model:o}),this.props.setexplainConfig({attr:e,value:t.target.value})}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",this.setState({model:t}),this.props.setexplainConfig({attr:"type",value:""}))}},{key:"onUploadChange",value:function(e){var t=this.state.model;t.top_image="",this.props.setGoodConfig({attr:"top_image",value:""}),e.length>0&&"success"==e[0].status&&(t.top_image=e[0].src,this.props.setGoodConfig({attr:"top_image",value:e[0].src})),this.setState({model:t})}},{key:"getsusEditext",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setexplainConfig({attr:"content",value:e})}},{key:"onUploadChange2",value:function(e){var t=this.state.model;t.describe.bg_image="",this.props.setexplainConfig({attr:"bg_image",value:""}),e.length>0&&"success"==e[0].status&&(t.describe.bg_image=e[0].src,this.props.setexplainConfig({attr:"bg_image",value:e[0].src})),this.setState({model:t})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig"));if(e&&e.whiteList){var t=e.whiteList;t.product_list=this.state.model,e.whiteList=t}else{var o={};o.product_list=this.state.model,e.whiteList=o}sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u57fa\u7840\u8bbe\u7f6e"}),Object(U.jsx)(D.a,{labelname:"banner\u5916\u94fe:",required:!1,labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){e.configChange("bannerUrl",t)},onClearItem:function(){e.configChange("bannerUrl","")},value:this.state.model.bannerUrl,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",height:"36px",width:"300px",alignment:"left",countShow:!1})}),Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u6837\u5f0f"}),Object(U.jsx)("div",{style:{marginBottom:"24px"},children:Object(U.jsx)(D.a,{labelname:"",labelwidth:"0px",required:!1,children:Object(U.jsxs)(O.a,{onChange:function(t){e.configChange("list",t.target.value)},value:this.state.model.list,children:[Object(U.jsx)(C.a,{value:"2",children:"\u8f6e\u64ad"}),Object(U.jsx)(C.a,{value:"1",children:"\u5217\u8868"}),Object(U.jsx)(C.a,{value:"3",children:"\u77e9\u9635"})]})})}),2==this.state.model.list?Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",style:{border:"1px solid #f1f2f3"},onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.font_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("font_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}):null,2==this.state.model.list?Object(U.jsx)(D.a,{labelname:"\u6309\u94ae\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{className:"#ffffff"==this.state.model.button_color?"cicle activecicle":"cicle",style:{border:"1px solid #f1f2f3"},onClick:function(){e.controlColor("button_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.button_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("button_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.button_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("button_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.button_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("button_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.button_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("button_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.button_color,onChange:function(t){return e.controlColor("button_color",t)}})})]})}):null,Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsx)(D.a,{labelname:"\u9876\u90e8banner:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,defaultFileList:this.state.model.top_image?[{src:this.state.model.top_image}]:null,onError:this.onUploadError})}),Object(U.jsxs)("div",{className:"activeTip",children:[Object(U.jsx)(D.a,{required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.explainChange("type",t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(1)},value:"1",children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(2)},value:"2",children:"\u60ac\u6d6e"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(3)},value:"3",children:"\u5bcc\u6587\u672c"})]})}),Object(U.jsx)(k.a,{trigger:"hover",position:"top-left",title:"\u975e\u5fc5\u9009\u9879\uff0c\u5706\u5f62\u7ec4\u4ef6\u60ac\u6d6e\uff0c\u9002\u7528\u4e8e\u957f\u6587\u672c",children:Object(U.jsx)(w.a,{type:"help-circle",className:"imgTip"})})]}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):2==this.state.model.describe.type?Object(U.jsx)(R,{pageType:"goodsuseditor",setEdittext:function(t){return e.getsusEditext(t)}}):3==this.state.model.describe.type?Object(U.jsx)(R,{pageType:"goodeditor",setEdittext:function(t){return e.getsusEditext(t)}}):null]})})}}]),o}(j.a.Component),X=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).state={editorHtml:""},i}return Object(s.a)(o,[{key:"componentDidMount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=this,o=new T.a("#wangeditorDom");this.setState({editor:o}),o.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],o.config.pasteText=!0,o.config.height=200,o.config.menus=["bold","foreColor","italic","indent","link","justify"],o.config.onchange=function(e){var i=o.txt.text();if(0==i.length&&t.props.setEdittext(""),i.length>1e3){var a=i.slice(0,1e3);return t.setState({editorHtml:a}),o.txt.html(a),void t.props.setEdittext(a)}t.setState({editorHtml:e}),t.props.setEdittext(e)},o.create();var i="",a=e.coupon;"landeditor"==this.props.pageType&&(i=e&&a&&a.land?a.land.describe.content:""),["goodeditor","goodsuseditor"].includes(this.props.pageType)&&(i=e&&a.product_list?a.product_list.describe.content:""),["detaileditor","detailsuseditor"].includes(this.props.pageType)&&(i=e&&a.product_detail?a.product_detail.describe.content:""),o.txt.html(i)}},{key:"render",value:function(){return Object(U.jsx)("div",{id:"wangeditorDom"})}}]),o}(j.a.Component),Z=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.setGoodDetailConfig({attr:e,value:t})},i.onUpload=function(e,t){return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={model:{font_color:"#ffffff",button_color:"#FACD6A",describe:{type:"",content:" ",bg_image:""}}},i}return Object(s.a)(o,[{key:"onActivityChange",value:function(e,t){var o=this.state.model;o.describe[e]=t.target.value,this.setState({model:o}),this.props.setdetailActive({attr:e,value:t.target.value})}},{key:"getSusEditText",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setdetailActive({attr:"content",value:e})}},{key:"onUploadChange",value:function(e){var t=this.state.model;t.describe.bg_image="",this.props.setdetailActive({attr:"bg_image",value:""}),e.length>0&&"success"==e[0].status&&(t.describe.bg_image=e[0].src,this.props.setdetailActive({attr:"bg_image",value:e[0].src})),this.setState({model:t})}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",this.setState({model:t}),this.props.setdetailActive({attr:"type",value:""}))}},{key:"componentWillMount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig"));this.setState({model:e.coupon.product_detail})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.coupon;t.product_detail=Object(b.a)(this.state.model),e.coupon=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsx)("h1",{style:{fontSize:"16px"},children:"\u5546\u54c1\u8be6\u60c5\u9875\u8bbe\u7f6e"})}),Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)("div",{style:{fontWeight:"bold",marginBottom:"20px"},children:"\u6837\u5f0f"}),Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.font_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("font_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}),Object(U.jsx)(D.a,{labelname:"\u6309\u94ae\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.button_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("button_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.button_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("button_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.button_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("button_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.button_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("button_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.button_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("button_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.button_color,onChange:function(t){return e.controlColor("button_color",t)}})})]})}),Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsxs)("div",{className:"activeTip",children:[Object(U.jsx)(D.a,{required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.onActivityChange("type",t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(1)},value:"1",children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(2)},value:"2",children:"\u60ac\u6d6e"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(3)},value:"3",children:"\u5bcc\u6587\u672c"})]})}),Object(U.jsx)(k.a,{trigger:"hover",position:"top-left",title:"\u975e\u5fc5\u9009\u9879\uff0c\u5706\u5f62\u7ec4\u4ef6\u60ac\u6d6e\uff0c\u9002\u7528\u4e8e\u957f\u6587\u672c",children:Object(U.jsx)(w.a,{type:"help-circle",className:"imgTip"})})]}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):2==this.state.model.describe.type?Object(U.jsx)(X,{pageType:"detailsuseditor",setEdittext:function(t){return e.getSusEditText(t)}}):3==this.state.model.describe.type?Object(U.jsx)(X,{pageType:"detaileditor",setEdittext:function(t){return e.getSusEditText(t)}}):null]})})]})}}]),o}(j.a.Component),$=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).changeFontcor=function(e){i.setState({font_color:e}),i.props.setReduceFontcolor(e)},i.changeButtoncor=function(e){i.setState({button_color:e}),i.props.setReduceButtoncolor(e)},i.state={font_color:"#AB582F",button_color:"#FACD6A"},i}return Object(s.a)(o,[{key:"fontcolor",value:function(e){this.setState({font_color:e}),this.props.setReduceFontcolor(e)}},{key:"buttoncolor",value:function(e){this.setState({button_color:e}),this.props.setReduceButtoncolor(e)}},{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));if(t&&t.coupon&&t.coupon.product_detail){var o=t.coupon.product_detail.reduce,i=o.font_color,a=o.button_color;this.setState({font_color:i,button_color:a})}}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.coupon;t.product_detail.reduce=Object(b.a)(this.state),e.coupon=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsx)("h1",{style:{fontSize:"16px"},children:"\u5546\u54c1\u8be6\u60c5\u9875\u7acb\u51cf\u91d1\u8bbe\u7f6e"})}),Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)("div",{style:{fontWeight:"bold",marginBottom:"20px"},children:"\u6837\u5f0f"}),Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{className:"#ffffff"==this.state.font_color?"cicle activecicle":"cicle",style:{border:"1px solid #f1f2f3"},onClick:function(){e.fontcolor("#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.font_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.fontcolor("#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.font_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.fontcolor("#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.font_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.fontcolor("#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.font_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.fontcolor("#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.font_color,onChange:this.changeFontcor})})]})}),Object(U.jsx)(D.a,{labelname:"\u80cc\u666f\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{className:"#ffffff"==this.state.button_color?"cicle activecicle":"cicle",style:{border:"1px solid #f1f2f3"},onClick:function(){e.buttoncolor("#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.button_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.buttoncolor("#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.button_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.buttoncolor("#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.button_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.buttoncolor("#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.button_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.buttoncolor("#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.button_color,onChange:this.changeButtoncor})})]})})]})})]})}}]),o}(j.a.Component),ee=(o(453),[{id:1,icon:"marketing-tupian",name:"picture",desc:"\u56fe\u7247"},{id:2,icon:"marketing-beijingtupian",name:"backgroundImg",desc:"\u80cc\u666f\u56fe"},{id:3,icon:"marketing-sousuolan-",name:"search",desc:"\u641c\u7d22\u680f"},{id:4,icon:"marketing-list",name:"bottomBar",desc:"\u5e95\u90e8\u680f"},{id:5,icon:"marketing-fuwenbenkuang",name:"title",desc:"\u6807\u9898"}]),te=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){return Object(c.a)(this,o),t.call(this,e)}return Object(s.a)(o,[{key:"propcomponentName",value:function(e){this.props.componentName(e.name),e.name&&u.a.emit("componentLib",{attr:e.name,value:1})}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{className:"componentLib",children:[Object(U.jsx)("h4",{onClick:function(){return e.propcomponentName({name:""})},children:"\u57fa\u7840\u7ec4\u4ef6"}),Object(U.jsx)("ul",{children:ee.map((function(t){return Object(U.jsxs)("li",{onClick:function(){return e.propcomponentName(t)},children:[Object(U.jsx)("i",{className:"marketing "+t.icon}),Object(U.jsx)("span",{children:t.desc})]},t.id)}))})]})}}]),o}(j.a.Component),oe=o(299),ie=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={bgImg:"",bgColor:"#f2f3f4"},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));if(t&&t.coupon&&t.coupon.product_list){var o=t.coupon.product_list.backgroundImg,i=o.bgColor,a=o.bgImg;this.setState({bgImg:a,bgColor:i})}}},{key:"bgColorFn",value:function(e){this.setState({bgColor:e}),u.a.emit("bgImgConfig",{attr:"bgColor",value:e})}},{key:"onUploadChange",value:function(e){var t="";e.length>0&&"success"==e[0].status&&(t=e[0].src),this.setState({bgImg:t}),u.a.emit("bgImgConfig",{attr:"bgImg",value:t})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.coupon;t.product_list.backgroundImg=Object(b.a)(this.state),e.coupon=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsxs)("div",{style:{fontSize:"16px"},children:[Object(U.jsx)(oe.a,{trigger:"hover",position:"bottom-center",content:"\u8fd4\u56de\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e",children:Object(U.jsx)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/back.svg",alt:"",onClick:function(){u.a.emit("goodListPage")},className:"back"})}),Object(U.jsx)("span",{className:"setConfig-title",children:"\u2003\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e> \u80cc\u666f\u56fe\u8bbe\u7f6e"})]})}),Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)(D.a,{labelname:"\u8986\u76d6\u80cc\u666f:",labelwidth:"80px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,defaultFileList:this.state.bgImg?[{src:this.state.bgImg}]:null,onError:this.onUploadError})}),Object(U.jsx)(D.a,{labelname:"\u80cc\u666f\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#fff"==this.state.bgColor?"cicle activecicle":"cicle",onClick:function(){e.bgColorFn("#fff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.bgColor?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.bgColorFn("#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.bgColor?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.bgColorFn("#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.bgColor?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.bgColorFn("#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.bgColor?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.bgColorFn("#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.bgColor,onChange:function(t){e.bgColorFn(t)}})})]})})]})})]})}}]),o}(j.a.Component),ae=o(82),ce=o(67),se=o(467),ne=(o(454),[{id:1,category:"\u9996\u9875"},{id:2,category:"\u8ba2\u5355"},{id:3,category:"\u6211\u7684\u5238"}]),le=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).handleChangeStatus=function(e,t){var o=i.state.navlist;o[e].iswitch=t?1:0,i.setState({navlist:o}),u.a.emit("bottomBarConfig",{attr:"navlist",value:o})},i.onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={iswitch:1,comType:1,navlist:[],defaultText:"#A6A5B2",selectText:"#FD6932",background:"http://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/bottom_bg.png"},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));t&&t.coupon&&t.coupon.product_list&&this.setState(Object(ce.a)({},t.coupon.product_list.bottomBar))}},{key:"changeConfig",value:function(e,t){this.setState(Object(ae.a)({},e,t)),u.a.emit("bottomBarConfig",{attr:e,value:t})}},{key:"hasItemFn",value:function(e){var t=Object(b.a)(this.state.navlist);if(1==e){var o=JSON.parse(sessionStorage.getItem("editorConfig")).coupon.product_list.bottomBar.navlist;t=Object(b.a)(o)}else t.forEach((function(e){e.pic.show="",e.pic.selectShow=""}));this.setState({navlist:t}),u.a.emit("bottomBarConfig",{attr:"navlist",value:t})}},{key:"upImgChange",value:function(e,t,o){var i=this.state.navlist;i[e].pic[t]="",o.length>0&&"success"==o[0].status&&(i[e].pic[t]=o[0].src),this.setState({navlist:i}),u.a.emit("bottomBarConfig",{attr:"navlist",value:i})}},{key:"onUploadChange",value:function(e){var t="";e.length>0&&"success"==e[0].status&&(t=e[0].src),this.setState({background:t}),u.a.emit("bottomBarConfig",{attr:"background",value:t})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.coupon;t.product_list.bottomBar=Object(b.a)(this.state),e.coupon=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{className:"bottomBar",children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsxs)("div",{style:{fontSize:"16px"},children:[Object(U.jsx)(oe.a,{trigger:"hover",position:"bottom-center",content:"\u8fd4\u56de\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e",children:Object(U.jsx)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/back.svg",alt:"",className:"back",onClick:function(){u.a.emit("goodListPage")}})}),Object(U.jsx)("span",{className:"setConfig-title",children:"\u2003\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e> \u5e95\u90e8\u680f\u8bbe\u7f6e"})]})}),Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)("div",{className:"activeTip",children:Object(U.jsx)(D.a,{required:!1,labelname:"\u7ec4\u4ef6\u6837\u5f0f:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.changeConfig("comType",t.target.value)},value:this.state.comType,children:[Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(1)},value:"1",children:"\u9ed8\u8ba4"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(2)},value:"2",children:"\u81ea\u5b9a\u4e49"})]})})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u4e0a\u4f20\u56fe\u6807:",labelwidth:"100px",children:Object(U.jsxs)("p",{className:"tips",children:["\uff08\u5efa\u8bae\u4e0a\u4f20\u5bbd\u9ad8\u4e3a",Object(U.jsx)("span",{children:"100*100"}),"\u50cf\u7d20\u7684",Object(U.jsx)("span",{children:".png"}),"\u56fe\u7247\uff09"]})}),ne.map((function(t,o){return Object(U.jsxs)("div",{className:"component-item",children:[Object(U.jsxs)("div",{className:"v-editItem",children:[Object(U.jsx)("span",{children:t.category}),3!=t.id?Object(U.jsxs)("p",{className:"dflexacsa",children:[Object(U.jsx)("span",{children:"\u663e\u793a"})," "]}):Object(U.jsxs)("div",{className:"dflexacsa",children:[Object(U.jsx)("span",{className:"showType",children:e.state.navlist[o].iswitch?"\u663e\u793a":"\u9690\u85cf"}),Object(U.jsx)(se.a,{checked:1==e.state.navlist[o].iswitch,onChange:function(t){return e.handleChangeStatus(o,t)}})]})]}),Object(U.jsx)(D.a,{labelname:"\u6dfb\u52a0\u56fe\u7247:",labelwidth:"100px",children:Object(U.jsxs)("div",{className:"dflexacsa",children:[Object(U.jsx)(E.a,{className:"zent-image-upload-demo choice-up-image",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u9ed8\u8ba4\u56fe",onChange:function(t){e.upImgChange(o,"show",t)},onUpload:e.onUpload,defaultFileList:e.state.navlist[o].pic.show?[{src:e.state.navlist[o].pic.show}]:null,onError:e.onUploadError}),Object(U.jsx)(E.a,{className:"zent-image-upload-demo choice-up-image",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u9009\u4e2d\u56fe",onChange:function(t){e.upImgChange(o,"selectShow",t)},onUpload:e.onUpload,defaultFileList:e.state.navlist[o].pic.selectShow?[{src:e.state.navlist[o].pic.selectShow}]:null,onError:e.onUploadError})]},e.state.navlist[o].pic.show)}),Object(U.jsx)(D.a,{labelname:"\u5bfc\u822a\u6587\u672c:",labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){var i=e.state.navlist;i[o].text=t,e.setState({navlist:i}),u.a.emit("bottomBarConfig",{attr:"navlist",value:i})},onClearItem:function(t){var i=e.state.navlist;i[o].text="",e.setState({navlist:i}),u.a.emit("bottomBarConfig",{attr:"navlist",value:i})},value:e.state.navlist[o].text,placeholder:t.category,labelWidth:"0px",maxLength:5,height:"36px",width:"300px",alignment:"left"})})]},o)})),Object(U.jsx)("div",{className:"color-control",children:Object(U.jsx)(D.a,{labelname:"\u9ed8\u8ba4\u6587\u5b57\u989c\u8272:",labelwidth:"140px",children:Object(U.jsxs)("div",{className:"colorItemfont dflexajce",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#000000"==this.state.defaultText?"cicle activecicle":"cicle",onClick:function(){e.changeConfig("defaultText","#fff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.defaultText?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.changeConfig("defaultText","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.defaultText?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.changeConfig("defaultText","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.defaultText?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.changeConfig("defaultText","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.defaultText?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.changeConfig("defaultText","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.defaultText,onChange:function(t){e.changeConfig("defaultText",t)}})})]})})}),Object(U.jsx)("div",{className:"color-control",children:Object(U.jsx)(D.a,{labelname:"\u9009\u4e2d\u6587\u5b57\u989c\u8272:",labelwidth:"140px",children:Object(U.jsxs)("div",{className:"colorItemfont dflexajce",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#fff"==this.state.selectText?"cicle activecicle":"cicle",onClick:function(){e.changeConfig("selectText","#fff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.selectText?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.changeConfig("selectText","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.selectText?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.changeConfig("selectText","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.selectText?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.changeConfig("selectText","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.selectText?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.changeConfig("selectText","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.selectText,onChange:function(t){e.changeConfig("selectText",t)}})})]})})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u80cc\u666f\u56fe:",labelwidth:"100px",children:Object(U.jsxs)("p",{className:"tips",children:["\uff08\u5efa\u8bae\u4e0a\u4f20\u5bbd\u9ad8\u4e3a",Object(U.jsx)("span",{children:"750*100"}),"\u50cf\u7d20\u7684\u56fe\u7247\uff09"]})}),Object(U.jsx)("div",{className:"component-item backpic-item",children:Object(U.jsx)(D.a,{labelname:"\u6dfb\u52a0\u56fe\u7247:",labelwidth:"100px",children:Object(U.jsx)("div",{className:"dflexacsa",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo choice-up-image",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,defaultFileList:this.state.background?[{src:this.state.background}]:null,onError:this.onUploadError})})})})]})})]})}}]),o}(j.a.Component),re=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={iswitch:1,img:"",jumpType:"0",jumpUrl:""},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));if(t&&t.coupon&&t.coupon.product_list){var o=t.coupon.product_list.picture,i=o.img,a=o.jumpType,c=o.jumpUrl;this.setState({img:i,jumpType:a,jumpUrl:c})}}},{key:"onjumpChange",value:function(e){this.setState({jumpType:e.target.value})}},{key:"onUploadChange",value:function(e){e.length>0&&"success"==e[0].status?(this.setState({img:e[0].src}),u.a.emit("picture",e[0].src)):(this.setState({img:""}),u.a.emit("picture",""))}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.coupon;t.product_list.picture=Object(b.a)(this.state),e.coupon=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{className:"assembly",children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsxs)("div",{style:{fontSize:"16px"},children:[Object(U.jsx)(oe.a,{trigger:"hover",position:"bottom-center",content:"\u8fd4\u56de\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e",children:Object(U.jsx)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/back.svg",alt:"",className:"back",onClick:function(){u.a.emit("goodListPage")}})}),Object(U.jsx)("span",{className:"setConfig-title",children:"\u2003\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e> \u56fe\u7247\u8bbe\u7f6e"})]})}),Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},className:"pdt15",children:Object(U.jsxs)(A.a,{model:this.state,children:[Object(U.jsx)(D.a,{labelname:"\u6dfb\u52a0\u56fe\u7247:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,defaultFileList:this.state.img?[{src:this.state.img}]:null,onError:this.onUploadError})}),Object(U.jsx)("div",{className:"activeTip",children:Object(U.jsx)(D.a,{required:!1,labelname:"\u8df3\u8f6c\u7c7b\u578b:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.onjumpChange(t)},value:this.state.jumpType,children:[Object(U.jsx)(C.a,{value:"0",children:"\u4e0d\u8df3\u8f6c"}),Object(U.jsx)(C.a,{value:"1",children:"\u94fe\u63a5"})]})})}),1==this.state.jumpType?Object(U.jsx)(D.a,{labelname:"\u8df3\u8f6c\u94fe\u63a5:",labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){e.setState({jumpUrl:t})},onClearItem:function(t){e.setState({jumpUrl:""})},value:this.state.jumpUrl,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:50,height:"36px",width:"300px",alignment:"left"})}):null]})})]})}}]),o}(j.a.Component),de=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).state={iswitch:1,shape:"circular",textAlign:"center",borderColor:"#FFFAF5",bgColor:"#FFD8BB",fontColor:"#ADADAD",placeholder:"\u8bf7\u8f93\u5165\u5546\u54c1\u540d\u79f0"},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));t&&t.coupon&&t.coupon.product_list&&this.setState(Object(ce.a)({},t.coupon.product_list.search))}},{key:"changeConfig",value:function(e,t){this.setState(Object(ae.a)({},e,t)),u.a.emit("searchBarConfig",{attr:e,value:t})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.coupon;t.product_list.search=Object(b.a)(this.state),e.coupon=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this,t=this.state,o=t.shape,i=t.textAlign,a=t.borderColor,c=t.placeholder,s=t.bgColor,n=t.fontColor;return Object(U.jsxs)("div",{className:"assembly",children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsxs)("div",{style:{fontSize:"16px"},children:[Object(U.jsx)(oe.a,{trigger:"hover",position:"bottom-center",content:"\u8fd4\u56de\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e",children:Object(U.jsx)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/back.svg",className:"back",alt:"",onClick:function(){u.a.emit("goodListPage")}})}),Object(U.jsx)("span",{className:"setConfig-title",children:"\u2003\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e> \u641c\u7d22\u680f\u8bbe\u7f6e"})]})}),Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{ref:"form1",children:[Object(U.jsx)("div",{className:"activeTip",children:Object(U.jsx)(D.a,{required:!1,labelname:"\u6846\u4f53\u6837\u5f0f:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.changeConfig("shape",t.target.value)},value:o,children:[Object(U.jsx)(C.a,{value:"circular",children:"\u5706\u5f62"}),Object(U.jsx)(C.a,{value:"square",children:"\u65b9\u5f62"})]})})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u6587\u5b57\u683c\u5f0f:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.changeConfig("textAlign",t.target.value)},value:i,children:[Object(U.jsx)(C.a,{value:"left",children:"\u5c45\u5de6"}),Object(U.jsx)(C.a,{value:"center",children:"\u5c45\u4e2d"}),Object(U.jsx)(C.a,{value:"right",children:"\u5c45\u53f3"})]})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u6846\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#fff"==a?"cicle activecicle":"cicle",onClick:function(){e.changeConfig("borderColor","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==a?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.changeConfig("borderColor","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==a?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.changeConfig("borderColor","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==a?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.changeConfig("borderColor","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==a?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.changeConfig("borderColor","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:a,onChange:function(t){e.changeConfig("borderColor",t)}})})]})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u80cc\u666f\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#fff"==s?"cicle activecicle":"cicle",onClick:function(){e.changeConfig("bgColor","#fff")}}),Object(U.jsx)("span",{className:"#04C160"==s?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.changeConfig("bgColor","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==s?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.changeConfig("bgColor","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==s?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.changeConfig("bgColor","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==s?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.changeConfig("bgColor","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{showAlpha:!0,className:"setbgColor",color:s,onChange:function(t){e.changeConfig("bgColor",t)}})})]})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u6587\u5b57\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#fff"==n?"cicle activecicle":"cicle",onClick:function(){e.changeConfig("fontColor","#fff")}}),Object(U.jsx)("span",{className:"#04C160"==n?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.changeConfig("fontColor","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==n?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.changeConfig("fontColor","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==n?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.changeConfig("fontColor","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==n?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.changeConfig("fontColor","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:n,onChange:function(t){e.changeConfig("fontColor",t)}})})]})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u63d0\u793a\u6587\u5b57:",labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){e.changeConfig("placeholder",t)},onClearItem:function(t){e.changeConfig("placeholder","")},value:c,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:9,height:"36px",width:"300px",alignment:"left"})})]})})]})}}]),o}(j.a.Component),ue=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={switch:1,text:"\u5546\u54c1\u5217\u8868",textAlign:"left",fontColor:"#333",fontSize:1,comstyle:1,pic:""},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig"));t&&t.coupon&&t.coupon.product_list&&this.setState(Object(ce.a)({},t.coupon.product_list.title))}},{key:"changeConfig",value:function(e,t){this.setState(Object(ae.a)({},e,t)),u.a.emit("titleBarConfig",{attr:e,value:t})}},{key:"onUploadChange",value:function(e){var t="";e.length>0&&"success"==e[0].status&&(t=e[0].src),this.setState({pic:t}),u.a.emit("titleBarConfig",{attr:"pic",value:t})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.coupon;t.product_list.title=Object(b.a)(this.state),e.coupon=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{className:"assembly",children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsxs)("div",{style:{fontSize:"16px"},children:[Object(U.jsx)(oe.a,{trigger:"hover",position:"bottom-center",content:"\u8fd4\u56de\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e",children:Object(U.jsx)("img",{className:"back",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/back.svg",alt:"",onClick:function(){u.a.emit("goodListPage")}})}),Object(U.jsx)("span",{className:"setConfig-title",children:"\u2003\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e> \u6807\u9898\u8bbe\u7f6e"})]})}),Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)(D.a,{required:!1,labelname:"\u7ec4\u4ef6\u6837\u5f0f:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.changeConfig("comstyle",t.target.value)},value:this.state.comstyle,children:[Object(U.jsx)(C.a,{value:1,children:"\u6587\u5b57"}),Object(U.jsx)(C.a,{value:2,children:"\u56fe\u7247"})]})}),1==this.state.comstyle?Object(U.jsxs)("div",{children:[Object(U.jsx)(D.a,{labelname:"\u6807\u9898\u6587\u5b57:",labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){e.changeConfig("text",t)},onClearItem:function(t){e.changeConfig("text","")},value:this.state.text,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"300px",alignment:"left"})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u6587\u5b57\u683c\u5f0f:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.changeConfig("textAlign",t.target.value)},value:this.state.textAlign,children:[Object(U.jsx)(C.a,{value:"left",children:"\u5c45\u5de6"}),Object(U.jsx)(C.a,{value:"center",children:"\u5c45\u4e2d"}),Object(U.jsx)(C.a,{value:"right",children:"\u5c45\u53f3"})]})}),Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#fff"==this.state.fontColor?"cicle activecicle":"cicle",onClick:function(){e.changeConfig("fontColor","#fff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.fontColor?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.changeConfig("fontColor","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.fontColor?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.changeConfig("fontColor","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.fontColor?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.changeConfig("fontColor","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.fontColor?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.changeConfig("fontColor","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.fontColor,onChange:function(t){e.changeConfig("fontColor",t)}})})]})}),Object(U.jsx)(D.a,{required:!1,labelname:"\u6587\u5b57\u5927\u5c0f:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.changeConfig("fontSize",t.target.value)},value:this.state.fontSize,children:[Object(U.jsx)(C.a,{value:"mini",children:"A-"}),Object(U.jsx)(C.a,{value:"standard",children:"A"}),Object(U.jsx)(C.a,{value:"big",children:"A+"})]})})]}):Object(U.jsx)(D.a,{labelname:"\u6dfb\u52a0\u56fe\u7247:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,defaultFileList:this.state.pic?[{src:this.state.pic}]:null,onError:this.onUploadError})})]})})]})}}]),o}(j.a.Component),he=o(521),me=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.setGoodConfig({attr:e,value:t})},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={model:{top_image:"",list:"2",font_color:"#f1f2f3",button_color:"#FACD6A",describe:{type:"",content:"",bg_image:""}}},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){u.a.emit("goodListPage");var t=JSON.parse(sessionStorage.getItem("editorConfig"));this.setState({model:t.coupon.product_list})}},{key:"configChange",value:function(e,t){var o=this.state.model;o[e]=t,this.setState({model:o}),this.props.setGoodConfig({attr:e,value:t})}},{key:"explainChange",value:function(e,t){var o=this.state.model;o.describe[e]=t.target.value,this.setState({model:o}),this.props.setexplainConfig({attr:e,value:t.target.value})}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",this.setState({model:t}),this.props.setexplainConfig({attr:"type",value:""}))}},{key:"onUploadChange",value:function(e){var t=this.state.model;t.top_image="",this.props.setGoodConfig({attr:"top_image",value:""}),e.length>0&&"success"==e[0].status&&(t.top_image=e[0].src,this.props.setGoodConfig({attr:"top_image",value:e[0].src})),this.setState({model:t})}},{key:"getsusEditext",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setexplainConfig({attr:"content",value:e})}},{key:"onUploadChange2",value:function(e){var t=this.state.model;t.describe.bg_image="",this.props.setexplainConfig({attr:"bg_image",value:""}),e.length>0&&"success"==e[0].status&&(t.describe.bg_image=e[0].src,this.props.setexplainConfig({attr:"bg_image",value:e[0].src})),this.setState({model:t})}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=this.state.model,o=t.top_image,i=t.list,a=t.font_color,c=t.button_color,s=t.describe,n=t.bannerUrl,l=e.coupon;l.product_list=Object(he.a)(l.product_list,{top_image:o,list:i,font_color:a,button_color:c,describe:s,bannerUrl:n}),e.coupon=l,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsx)("div",{children:this.props.componentName?function(){switch(e.props.componentName){case"picture":return Object(U.jsx)(re,{});case"backgroundImg":return Object(U.jsx)(ie,{});case"search":return Object(U.jsx)(de,{});case"bottomBar":return Object(U.jsx)(le,{});case"title":return Object(U.jsx)(ue,{})}}():Object(U.jsxs)("div",{children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsx)("h1",{style:{fontSize:"16px"},children:"\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e"})}),Object(U.jsx)("div",{style:{width:"92%",margin:"0 auto",overflow:"auto",maxHeight:"100%"},children:Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u57fa\u7840\u8bbe\u7f6e"}),Object(U.jsx)(D.a,{labelname:"banner\u5916\u94fe:",required:!1,labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){e.configChange("bannerUrl",t)},onClearItem:function(){e.configChange("bannerUrl","")},value:this.state.model.bannerUrl,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",height:"36px",width:"300px",alignment:"left",countShow:!1})}),Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u6837\u5f0f"}),Object(U.jsx)("div",{style:{marginBottom:"24px"},children:Object(U.jsx)(D.a,{labelname:"",labelwidth:"0px",required:!1,children:Object(U.jsxs)(O.a,{onChange:function(t){e.configChange("list",t.target.value)},value:this.state.model.list,children:[Object(U.jsx)(C.a,{value:"2",children:"\u8f6e\u64ad"}),Object(U.jsx)(C.a,{value:"1",children:"\u5217\u8868"}),Object(U.jsx)(C.a,{value:"3",children:"\u77e9\u9635"})]})})}),2==this.state.model.list?Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",style:{border:"1px solid #f1f2f3"},onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.font_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("font_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}):null,2==this.state.model.list?Object(U.jsx)(D.a,{labelname:"\u6309\u94ae\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{className:"#ffffff"==this.state.model.button_color?"cicle activecicle":"cicle",style:{border:"1px solid #f1f2f3"},onClick:function(){e.controlColor("button_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.button_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("button_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.button_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("button_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.button_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("button_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.button_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("button_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.button_color,onChange:function(t){return e.controlColor("button_color",t)}})})]})}):null,Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsx)(D.a,{labelname:"\u9876\u90e8banner:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t)},onUpload:this.onUpload,defaultFileList:this.state.model.top_image?[{src:this.state.model.top_image}]:null,onError:this.onUploadError})}),Object(U.jsxs)("div",{className:"activeTip",children:[Object(U.jsx)(D.a,{required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.explainChange("type",t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(1)},value:"1",children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(2)},value:"2",children:"\u60ac\u6d6e"}),Object(U.jsx)(C.a,{onClick:function(){return e.hasItemFn(3)},value:"3",children:"\u5bcc\u6587\u672c"})]})}),Object(U.jsx)(k.a,{trigger:"hover",position:"top-left",title:"\u975e\u5fc5\u9009\u9879\uff0c\u5706\u5f62\u7ec4\u4ef6\u60ac\u6d6e\uff0c\u9002\u7528\u4e8e\u957f\u6587\u672c",children:Object(U.jsx)(w.a,{type:"help-circle",className:"imgTip"})})]}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):2==this.state.model.describe.type?Object(U.jsx)(X,{pageType:"goodsuseditor",setEdittext:function(t){return e.getsusEditext(t)}}):3==this.state.model.describe.type?Object(U.jsx)(X,{pageType:"goodeditor",setEdittext:function(t){return e.getsusEditext(t)}}):null]})})]})})}}]),o}(j.a.Component),be=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).controlColor=function(e,t){var o=i.state.model;o[e]=t,i.setState({model:o}),i.props.landConfig({attr:e,value:t})},i.onUploadError=function(e,t){"overMaxAmount"===e?x.a.error("\u6700\u591a\u53ef\u4e0a\u4f20 ".concat(t.maxAmount," \u5f20\u56fe\u7247")):"overMaxSize"===e&&x.a.error("\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ".concat(t.formattedMaxSize))},i.onUpload=function(e,t){Object(n.a)(i);return new Promise((function(o,i){var a="",c=new FormData;c.append("file",e),c.append("path","common_image"),Object(d.kd)(c).then((function(e){Object(d.Yb)(e,(function(e,t){a=e.path}),(function(e){i()}))}));var s=0;setTimeout((function e(){a?o(a):s<100?(t(s+=2),setTimeout(e,500)):i()}),500)}))},i.state={model:{title:"\u843d\u5730\u9875\u6807\u9898",top_image:"",middle_image:"",white_image:"",describe:{type:"",content:"",bg_image:""},bg_color:"#EEEEEE",font_color:"#000000"},mouldType:""},i}return Object(s.a)(o,[{key:"componentWillMount",value:function(e){var t=JSON.parse(sessionStorage.getItem("editorConfig")),o=sessionStorage.getItem("mouldType"),i=t.coupon.land;this.setState({model:i,mouldType:o})}},{key:"onactivityChange",value:function(e){var t=this.state.model;t.describe.type=e.target.value,t.describe.bg_image&&(t.describe.bg_image=""),this.setState({model:t}),this.props.setbanner(this.state.model)}},{key:"hasItemFn",value:function(e){var t=this.state.model;e==t.describe.type&&(t.describe.type="",t.describe.type=0,this.setState({model:t}),this.props.setbanner(this.state.model))}},{key:"onUploadChange",value:function(e,t){var o=this.state.model;o[t]="",e.length>0&&"success"==e[0].status&&(o[t]=e[0].src),this.setState({model:o}),this.props.setbanner(o)}},{key:"onUploadChange2",value:function(e){var t=this.state.model;t.describe.bg_image="",e.length>0&&"success"==e[0].status&&(t.describe.bg_image=e[0].src),this.setState({model:t}),this.props.setbanner(t)}},{key:"getEditext",value:function(e){var t=this.state.model;t.describe.content=e,this.setState({model:t}),this.props.setbanner(t)}},{key:"componentWillUnmount",value:function(){var e=JSON.parse(sessionStorage.getItem("editorConfig")),t=e.coupon;t.land=this.state.model,e.coupon=t,sessionStorage.setItem("editorConfig",JSON.stringify(e))}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{children:[Object(U.jsx)("div",{className:"control page-title-control",children:Object(U.jsx)("h1",{style:{fontSize:"16px"},children:"\u843d\u5730\u9875\u8bbe\u7f6e"})}),Object(U.jsxs)("div",{style:{width:"92%",margin:"0 auto 60px",overflow:"auto",maxHeight:"100%"},children:[0!=this.state.mouldType?Object(U.jsx)("div",{style:{fontWeight:"bold"},children:"\u57fa\u7840\u8bbe\u7f6e"}):null,Object(U.jsxs)(A.a,{model:this.state.model,ref:"form1",children:[0!=this.state.mouldType?Object(U.jsx)(D.a,{labelname:"\u843d\u5730\u9875\u6807\u9898:",labelwidth:"100px",children:Object(U.jsx)(L.a,{onChange:function(t){var o=e.state.model;o.title=t,e.setState({model:o}),e.props.landConfig({attr:"title",value:t})},onClearItem:function(t){var o=e.state.model;o.title="",e.setState({model:o})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"300px",alignment:"left"})}):null,Object(U.jsx)("div",{style:{marginBottom:"15px",fontWeight:"bold"},children:"\u6837\u5f0f"}),Object(U.jsx)(D.a,{labelname:"\u80cc\u666f\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItembg dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.bg_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("bg_color","#ffffff")}}),Object(U.jsx)("span",{className:"#EEEEEE"==this.state.model.bg_color?"activecicle cicle cicle1":"cicle cicle1",onClick:function(){e.controlColor("bg_color","#EEEEEE")}}),Object(U.jsx)("span",{className:"#000000"==this.state.model.bg_color?"activecicle cicle cicle2":"cicle cicle2",onClick:function(){e.controlColor("bg_color","#000000")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.bg_color,onChange:function(t){return e.controlColor("bg_color",t)}})})]})}),Object(U.jsx)(D.a,{labelname:"\u5b57\u4f53\u989c\u8272:",labelwidth:"80px",children:Object(U.jsxs)("div",{className:"colorItemfont dfleac",children:[Object(U.jsx)("span",{style:{border:"1px solid #f1f2f3"},className:"#ffffff"==this.state.model.font_color?"cicle activecicle":"cicle",onClick:function(){e.controlColor("font_color","#ffffff")}}),Object(U.jsx)("span",{className:"#04C160"==this.state.model.font_color?"activecicle cicle cicle6":"cicle cicle6",onClick:function(){e.controlColor("font_color","#04C160")}}),Object(U.jsx)("span",{className:"#AE99D3"==this.state.model.font_color?"activecicle cicle cicle3":"cicle cicle3",onClick:function(){e.controlColor("font_color","#AE99D3")}}),Object(U.jsx)("span",{className:"#FACD6A"==this.state.model.font_color?"activecicle cicle cicle4":"cicle cicle4",onClick:function(){e.controlColor("font_color","#FACD6A")}}),Object(U.jsx)("span",{className:"#FE7962"==this.state.model.font_color?"activecicle cicle cicle5":"cicle cicle5",onClick:function(){e.controlColor("font_color","#FE7962")}}),Object(U.jsx)("div",{className:"selfset",children:Object(U.jsx)(N.a,{className:"setbgColor",color:this.state.model.font_color,onChange:function(t){return e.controlColor("font_color",t)}})})]})}),Object(U.jsx)("div",{style:{marginTop:"20px",fontWeight:"bold"},children:"\u57fa\u7840\u56fe\u5c42"}),Object(U.jsx)(D.a,{labelname:"\u9876\u90e8banner:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t,"top_image")},onUpload:this.onUpload,defaultFileList:this.state.model.top_image?[{src:this.state.model.top_image}]:null,onError:this.onUploadError})}),4==this.props.couponType?Object(U.jsx)(D.a,{labelname:"\u8f93\u5165\u6846:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t,"middle_image")},defaultFileList:this.state.model.middle_image?[{src:this.state.model.middle_image}]:null,onUpload:this.onUpload,onError:this.onUploadError})},1):Object(U.jsx)(D.a,{labelname:"\u8f93\u5165\u6846:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange(t,"white_image")},defaultFileList:this.state.model.white_image?[{src:this.state.model.white_image}]:null,onUpload:this.onUpload,onError:this.onUploadError})},2),Object(U.jsx)(D.a,{myClassName:"activeSet",required:!1,labelname:"\u6d3b\u52a8\u8bf4\u660e:",labelwidth:"100px",children:Object(U.jsxs)(O.a,{onChange:function(t){e.onactivityChange(t)},value:this.state.model.describe.type,children:[Object(U.jsx)(C.a,{value:"1",onClick:function(){return e.hasItemFn(1)},children:"\u56fe\u7247"}),Object(U.jsx)(C.a,{value:"2",onClick:function(){return e.hasItemFn(2)},children:"\u5bcc\u6587\u672c"})]})}),1==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:" ",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):null,2==this.state.model.describe.type?Object(U.jsx)(D.a,{required:!1,labelname:"\u80cc\u666f\u56fe\u6848:",labelwidth:"100px",children:Object(U.jsx)(E.a,{className:"zent-image-upload-demo",maxSize:5242880,maxAmount:1,multiple:!0,sortable:!0,tips:"\u5355\u5f20\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",onChange:function(t){e.onUploadChange2(t)},onUpload:this.onUpload,onError:this.onUploadError,defaultFileList:this.state.model.describe.bg_image?[{src:this.state.model.describe.bg_image}]:null})}):null,2==this.state.model.describe.type?Object(U.jsx)(X,{pageType:"landeditor",setEdittext:function(t){return e.getEditext(t)}}):null]})]})]})}}]),o}(j.a.Component),fe={1:"whiteList",3:"exchange",4:"coupon",8:"coupon"},pe={title:"\u843d\u5730\u9875\u6807\u9898",top_image:"",middle_image:"",white_image:"",describe:{type:"",content:"",bg_image:""},bg_color:"#EEEEEE",sort:1,type_id:{key:2,text:"\u901a\u7528"},font_color:"#000000",thumb:""},ge={top_image:"",list:"2",font_color:"#ffffff",button_color:"#FACD6A",describe:{type:"",content:"",bg_image:""}},je={font_color:"#ffffff",button_color:"#FACD6A",describe:{type:"",content:"",bg_image:""},reduce:{font_color:"#AB582F",button_color:"#FACD6A"}},xe={top_image:"",list:"2",font_color:"#ffffff",button_color:"#FACD6A",describe:{type:"",content:"",bg_image:""},picture:{iswitch:0,img:"",jumpType:"0",jumpUrl:""},backgroundImg:{iswitch:0,bgImg:"",bgColor:"#f2f3f4"},search:{iswitch:0,shape:"circular",textAlign:"center",borderColor:"#FFFAF5",bgColor:"#FFD8BB",fontColor:"#ADADAD",placeholder:"\u8bf7\u8f93\u5165\u5546\u54c1\u540d\u79f0"},title:{iswitch:0,text:"\u5546\u54c1\u5217\u8868",textAlign:"left",fontColor:"#333",fontSize:1,comstyle:1,pic:""},bottomBar:{iswitch:0,navlist:[{id:1,iswitch:1,name:"index",pic:{show:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/home.png",selectShow:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/home_check.png"},text:"\u9996\u9875"},{id:2,iswitch:1,name:"order",pic:{show:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/order.png",selectShow:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/order_check.png"},text:"\u8ba2\u5355"},{id:3,iswitch:1,name:"coupon",pic:{show:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/coupon.png",selectShow:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/coupon_check.png"},text:"\u6211\u7684\u5238"}],defaultText:"#A6A5B2",selectText:"#FD6932",background:"http://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/bottom_bg.png"}},ve=function(e){Object(l.a)(o,e);var t=Object(r.a)(o);function o(e){var i;return Object(c.a)(this,o),(i=t.call(this,e)).state={mouldType:1,systemTitle:"",activeshow:!0,loading_visible:!1,componentOfconfig:"",detailactiveshow:!0,pagedisable:!1,showType:3,model:pe,product_list:ge,product_detail:je,preview_visible:!1,previewData:null,pageInfo:null,activeNavStatus:1,activeHeight:667,pageStep:1,showPage:1,setStyle:{width:"375px",height:"667px",transform:"scale(0.75)"},detailType:1},i.canvasImgDom=i.canvasImgDom.bind(Object(n.a)(i)),i.canvasImgDomScr=i.canvasImgDomScr.bind(Object(n.a)(i)),i}return Object(s.a)(o,[{key:"componentDidMount",value:function(){var e=this;u.a.addListener("componentLib",(function(t){var o=Object(b.a)(JSON.parse(sessionStorage.getItem("editorConfig"))),i=e.state.product_list;i[t.attr].iswitch=t.value,e.setState({product_list:i}),0==t.value&&e.setState({componentName:""}),o.coupon.product_list=i,sessionStorage.setItem("editorConfig",JSON.stringify(o))})),u.a.addListener("goodListPage",(function(t){e.setState({componentOfconfig:""})})),u.a.addListener("picture",(function(t){var o=e.state.product_list;o.picture.img=t,e.setState({product_list:o})})),u.a.addListener("bgImgConfig",(function(t){var o=e.state.product_list;o.backgroundImg[t.attr]=t.value,e.setState({product_list:o})})),u.a.addListener("searchBarConfig",(function(t){var o=e.state.product_list;o.search[t.attr]=t.value,e.setState({product_list:o})})),u.a.addListener("titleBarConfig",(function(t){var o=e.state.product_list;o.title[t.attr]=t.value,e.setState({product_list:o})})),u.a.addListener("bottomBarConfig",(function(t){var o=e.state.product_list;o.bottomBar[t.attr]=t.value,e.setState({product_list:o})})),setTimeout((function(){var e=document.getElementById("center-img"),t=document.getElementById("center");e.onload=function(){t.style.height=e.clientHeight-2+"px"}}),500)}},{key:"onpageChange",value:function(e){this.setState({showPage:e.target.value,pageStep:e.target.value})}},{key:"ondetailTypeChange",value:function(e){this.setState({detailType:e.target.value})}},{key:"componentWillMount",value:function(e){var t=window.location.href,o=t.lastIndexOf("="),i=null;o>-1&&(i=t.substr(o+1,t.length)),sessionStorage.removeItem("editorConfig");var a=JSON.parse(sessionStorage.getItem("pageInfo")),c=sessionStorage.getItem("mouldType");this.setState({mouldType:c});var s=sessionStorage.getItem("pageChange");if(a){var n=a.page;this.setState({showType:Number(a.page),systemTitle:a.title});var l=Object(f.a)(a);i&&(this.setState({showType:Number(i)}),n=i);var r=l.exchange;r||((r={}).land=pe,r.product_list=ge,r.product_detail=je),r.land.title=l.title,r.land.sort=l.sort;var d=l.access_conf;d||((d={}).land=pe,d.product_list=ge,d.product_detail=je),d.land.title=l.title,d.land.sort=l.sort;var u=l.coupon;u||((u={}).land=pe,u.product_list=xe,u.product_detail=je),u.land.title=l.title,u.land.sort=l.sort,l.exchangeList=r,l.whiteList=d,l.coupon=u,this.setState({model:l[fe[n]].land,product_list:l[fe[n]].product_list,product_detail:l[fe[n]].product_detail}),sessionStorage.setItem("editorConfig",JSON.stringify(l)),0!=c&&1==s&&this.setState({pagedisable:!0})}else{var h,m,p,g={},j={land:pe,product_list:ge,product_detail:je},x={land:pe,product_list:xe,product_detail:je};h=Object(b.a)(j),m=Object(b.a)(j),p=Object(b.a)(x),g.exchangeList=m,g.whiteList=h,g.coupon=p,sessionStorage.setItem("editorConfig",JSON.stringify(g))}}},{key:"onSave",value:function(){var e=Object(a.a)(Object(i.a)().mark((function e(){var t,o,a,c,s,n,l,r,u,h,m,g,j,v,O,C,y,_=this;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object(f.a)(this.state),o=this,a=sessionStorage.getItem("mouldType"),c=JSON.parse(sessionStorage.getItem("pageInfo")),s=Object(b.a)(JSON.parse(sessionStorage.getItem("editorConfig"))),n=Object(p.a)(s.whiteList,["land[sort]","land[title]","land[type_id]","land[thumb]"]),l=Object(p.a)(s.coupon,["land[sort]","land[title]",,"land[thumb]"]),this.state.model.top_image){e.next=12;break}return x.a.clear(),x.a.error("\u8bf7\u4e0a\u4f20\u843d\u5730\u9875\u9876\u90e8banner"),this.setState({activeNavStatus:1}),e.abrupt("return");case 12:if(r=!0,8==this.state.showType&&(this.state.model.white_image||(r=!1)),8!=this.state.showType&&(this.state.model.middle_image||(r=!1)),r){e.next=20;break}return x.a.clear(),x.a.error("\u8bf7\u4e0a\u4f20\u843d\u5730\u9875\u8f93\u5165\u6846"),this.setState({activeNavStatus:1}),e.abrupt("return");case 20:if(this.state.product_list.list){e.next=25;break}return x.a.clear(),x.a.error("\u8bf7\u9009\u62e9\u5546\u54c1\u5217\u8868\u9875\u6837\u5f0f"),this.setState({activeNavStatus:2}),e.abrupt("return");case 25:if(this.state.product_list.top_image){e.next=30;break}return x.a.clear(),x.a.error("\u8bf7\u4e0a\u4f20\u5546\u54c1\u5217\u8868\u9875\u9876\u90e8banner"),this.setState({activeNavStatus:2}),e.abrupt("return");case 30:if(this.setState({loading_visible:!0,activeNavStatus:1}),0!=a){e.next=38;break}if(this.setState({activeNavStatus:1}),3==this.state.showType){e.next=38;break}return x.a.clear(),x.a.error("\u8bf7\u5207\u6362\u81f3\u5151\u6362\u7801\u4fdd\u5b58"),o.setState({loading_visible:!1}),e.abrupt("return");case 38:return this.canvasImg.style.display="block",e.next=41,this.canvasImgFn();case 41:if(u=e.sent,h={title:t.model.title,page:t.showType,type_id:0,thumb:u},0!=a){e.next=56;break}h.sort=t.model.sort,h.type_id=t.model.type_id.key,(m={}).land=t.model,m.product_list=t.product_list,m.product_detail=t.product_detail,h.exchange=Object(p.a)(m,["land[sort]","land[title]","thumb"]),h.access_conf=n,h.coupon=l,c?Object(d.Oc)(c.id,h).then((function(e){Object(d.Yb)(e,(function(e,t){x.a.success("\u4fdd\u5b58\u6210\u529f"),_.props.history.push("/home/system/my-mould")}),(function(e){x.a.error(e)}))})):Object(d.e)(h).then((function(e){Object(d.Yb)(e,(function(e,t){x.a.success(t),o.setState({loading_visible:!1}),setTimeout((function(){_.props.history.push("/home/system/my-mould")}),2e3)}),(function(e){o.setState({loading_visible:!1}),x.a.error(e)}))})),e.next=81;break;case 56:if(1!=a){e.next=80;break}g=Object(f.a)(t),j={},v=g.model,j.land=v,j.product_list=g.product_list,j.product_detail=g.product_detail,delete j.land.sort,delete j.land.title,e.t0=this.state.showType,e.next=3===e.t0?68:1===e.t0?70:4===e.t0?72:8===e.t0?74:76;break;case 68:return h.exchange=j,e.abrupt("break",77);case 70:return h.access_conf=j,e.abrupt("break",77);case 72:case 74:return h.coupon=j,e.abrupt("break",77);case 76:return e.abrupt("break",77);case 77:c?Object(d.Hc)(c.id,h).then((function(e){Object(d.Yb)(e,(function(e,t){o.setState({loading_visible:!1}),x.a.success(t),setTimeout((function(){o.props.history.push("/home/myexchangetemplate")}),2e3)}),(function(e){o.setState({loading_visible:!1}),x.a.error(e)}))})):Object(d.f)(h).then((function(e){Object(d.Yb)(e,(function(e,t){o.setState({loading_visible:!1}),x.a.success(t),setTimeout((function(){o.props.history.push("/home/myexchangetemplate")}),2e3)}),(function(e){o.setState({loading_visible:!1}),x.a.error(e)}))})),e.next=81;break;case 80:2==a&&(O=Object(f.a)(t),C={},y=O.model,C.land=y,C.product_list=O.product_list,C.product_detail=O.product_detail,C.thumb=u,delete C.land.sort,delete C.land.title,3==this.state.showType?h.exchange=C:1==this.state.showType?h.access_conf=C:h.coupon=C,Object(d.Pc)(c.id,h).then((function(e){Object(d.Yb)(e,(function(e,t){o.setState({loading_visible:!1}),x.a.success(t),o.props.history.push("/home/exchangepage")}),(function(e){o.setState({loading_visible:!1}),x.a.error(e)}))})));case 81:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getLandingdata",value:function(e){this.setState({model:e})}},{key:"getlandConfig",value:function(e){var t=this.state.model;t[e.attr]=e.value,this.setState({model:t})}},{key:"getGoodConfig",value:function(e){var t=this.state.product_list;t[e.attr]=e.value,this.setState({product_list:t})}},{key:"getexplainConfig",value:function(e){var t=this.state.product_list;t.describe[e.attr]=e.value,this.setState({product_list:t})}},{key:"getGoodDetailConfig",value:function(e){var t=this.state.product_detail;t[e.attr]=e.value,this.setState({product_detail:t})}},{key:"getdetailActiveFn",value:function(e){var t=this.state.product_detail;t.describe[e.attr]=e.value,this.setState({product_detail:t})}},{key:"onmodelChange",value:function(e){var t,o=Object(b.a)(JSON.parse(sessionStorage.getItem("editorConfig")));switch(0==this.state.mouldType&&3!=e.target.value&&this.setState({systemTitle:o.exchangeList.land.title}),e.target.value){case 1:t=o.whiteList;break;case 3:t=o.exchangeList;break;default:3===this.state.detailType&&this.setState({detailType:1});var i=this.state,a=i.activeNavStatus,c=i.showType,s=i.model,n=i.product_list,l=i.product_detail;1==a&&[4,8].includes(c)&&(o.coupon.land=s),2==a&&[4,8].includes(c)&&(o.coupon.product_list=n),3==a&&[4,8].includes(c)&&(o.coupon.product_detail=l),sessionStorage.setItem("editorConfig",JSON.stringify(o)),t=o.coupon}var r=t,d=r.land,u=r.product_list,h=r.product_detail;this.setState({showType:e.target.value,activeNavStatus:1,model:d,product_list:u,product_detail:h})}},{key:"onPreview",value:function(){var e=Object(b.a)(this.state);e.land=this.state.model,this.setState({previewData:e}),this.setState({preview_visible:!0})}},{key:"getReduceButtoncolor",value:function(e){var t=this.state.product_detail;t.reduce.button_color=e,this.setState({product_detail:t})}},{key:"getReduceFontcolor",value:function(e){var t=this.state.product_detail;t.reduce.font_color=e,this.setState({product_detail:t})}},{key:"onClose",value:function(){this.setState({preview_visible:!1})}},{key:"canvasImgFn",value:function(){var e=this,t=null,o=this.canvascrol;o.scrollTop=0;var c=document.querySelector(".xj-viewer-mask"),s=document.querySelector(".editor-main");c.style.height=o.scrollHeight+"px",s.style.height=1*o.scrollHeight+50+"px",c.style.maxHeight=o.scrollHeight+"px";var n=m()(o,{width:375,scale:1,useCORS:!0,allowTaint:!1,height:o.offsetHeight}).then(function(){var o=Object(a.a)(Object(i.a)().mark((function o(a){var n,l,r,u;return Object(i.a)().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return document.body.appendChild(a),n=a.toDataURL(),l=e.dataURLtoFile(n,"image/png"),r=new FormData,u=new File([l],new Date+".png"),r.append("file",u),r.append("path","common_image"),o.next=9,Object(d.kd)(r).then((function(o){Object(d.Yb)(o,(function(o,i){t=o.path;var a=e.state.model;a.thumb=o.path,e.setState({model:a})}),(function(e){}))}));case 9:return o.sent,c.style.height="100%",c.style.maxHeight="600px",s.style.height="600px",o.abrupt("return",t);case 14:case"end":return o.stop()}}),o)})));return function(e){return o.apply(this,arguments)}}());return n}},{key:"dataURLtoFile",value:function(e,t){for(var o=atob(e.split(",")[1]),i=[],a=0;a3&&(e=3),this.setState({activeNavStatus:e})}},{key:"showactiveIcon",value:function(e){this.setState({activeshow:!1})}},{key:"showactivedetail",value:function(e){this.setState({detailactiveshow:!1})}},{key:"componentWillUnmount",value:function(){document.querySelector("canvas")&&document.querySelector("canvas").remove(),u.a.removeAllListeners()}},{key:"componentName",value:function(e){this.setState({componentOfconfig:e})}},{key:"returnComponents",value:function(){var e=this;switch(Number(this.state.detailType)){case 1:return Object(U.jsx)(S.a,{opendesc:function(t){return e.setState({detailactiveshow:!0})},detaildata:this.state.product_detail,templateType:this.state.showType});case 2:return Object(U.jsx)(P.a,{templateType:this.state.showType,detaildata:this.state.product_detail});case 3:return Object(U.jsx)(G.a,{})}}},{key:"render",value:function(){var e=this;return Object(U.jsxs)("div",{className:"edittemplate",children:[Object(U.jsxs)("div",{className:"topHeader",children:[Object(U.jsxs)("div",{className:"dflexaj",children:[Object(U.jsx)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepage.png",onClick:this.preUrlFn}),Object(U.jsx)("span",{className:"fz16",children:"\u7f16\u8f91\u843d\u5730\u9875"})]}),Object(U.jsxs)("div",{children:[Object(U.jsx)(v.a,{type:"Info",onClick:function(t){e.onPreview(t)},children:"\u9884\u89c8"}),Object(U.jsx)(v.a,{type:"primary",onClick:function(t){e.onSave(t)},children:"\u4fdd\u5b58"})]})]}),Object(U.jsxs)("div",{id:"leftComponent",children:[Object(U.jsx)("div",{className:"showTypechice",children:Object(U.jsxs)(O.a,{onChange:function(t){e.onmodelChange(t)},value:this.state.showType,children:[Object(U.jsx)(C.a,{value:3,disabled:this.state.pagedisable,children:"\u5151\u6362\u7801"}),Object(U.jsx)(C.a,{value:1,disabled:this.state.pagedisable,children:"\u767d\u540d\u5355"}),Object(U.jsx)(C.a,{value:4,disabled:this.state.pagedisable,children:"\u4f18\u60e0\u5238"}),Object(U.jsx)(C.a,{value:8,disabled:this.state.pagedisable,children:"\u4f18\u60e0\u5238\u767d\u540d\u5355"})]})}),Object(U.jsxs)("div",{className:"ascriptionCode",children:[Object(U.jsxs)("div",{className:"item",children:[Object(U.jsx)("h4",{children:"\u843d\u5730\u9875:"}),Object(U.jsxs)("div",{onClick:function(){return e.activeChoice(1)},style:{background:this.state.model.bg_color},className:1==this.state.activeNavStatus?"activeNav thumbheader":"thumbheader",children:[0==this.state.mouldType&&3!=this.state.showType,Object(U.jsxs)("h3",{children:[0==this.state.mouldType&&3!=this.state.showType?this.state.systemTitle:this.state.model.title," "]}),Object(U.jsx)("img",{src:this.state.model.top_image?this.state.model.top_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/59ba305520d3229e7fc53d5229bfec0c.png",id:"top"},this.state.model.top_image),Object(U.jsxs)("div",{className:"hascode",children:[Object(U.jsx)("img",{src:8==this.state.showType?this.state.model.white_image?this.state.model.white_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20221107/2c407b6b702ed2217e22f8df8a7c87e6.png":this.state.model.middle_image?this.state.model.middle_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20221107/2c407b6b702ed2217e22f8df8a7c87e6.png",id:"top"}),Object(U.jsxs)("div",{className:"dflexajc thumbipt",children:[Object(U.jsxs)("div",{style:{color:this.state.model.font_color},children:["\u8bf7\u8f93\u5165",[1,8].includes(this.state.showType)?"\u624b\u673a\u53f7":"\u5151\u6362\u7801"]}),Object(U.jsx)("div",{className:"ipt-code",style:{color:this.state.model.font_color},children:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"})]}),[1,8].includes(this.state.showType)?Object(U.jsx)("img",{src:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220127/22e5d4c1b1190a0a7bc8db43e1490d67.png",className:"thumbcode"}):Object(U.jsx)("img",{src:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/7dafa511638b084f21966b2c3d269a0e.png",className:"thumbcode"})]}),this.state.model.describe&&this.state.model.describe.bg_image?Object(U.jsx)("img",{src:this.state.model.describe.bg_image}):null]})]}),Object(U.jsxs)("div",{className:"item",children:[Object(U.jsx)("h4",{children:"\u5546\u54c1\u5217\u8868\u9875:"}),Object(U.jsx)("div",{onClick:function(){return e.activeChoice(2)},className:2==this.state.activeNavStatus?"activeNav thumbheader":"thumbheader",children:Object(U.jsx)("div",{className:"goodsList-item",children:Object(U.jsx)(H.a,{opendesc:function(t){return e.setState({activeshow:!0})},goodsdata:this.state.product_list})})})]}),Object(U.jsxs)("div",{className:"item",children:[Object(U.jsx)("h4",{children:"\u5546\u54c1\u8be6\u60c5\u9875:"}),Object(U.jsx)("div",{onClick:function(){return e.activeChoice(3)},className:3==this.state.activeNavStatus?"activeNav thumbheader":"thumbheader",children:Object(U.jsx)("div",{className:"detailstemplatescale",children:this.returnComponents()})})]})]}),[4,8].includes(this.state.showType)&&2==this.state.activeNavStatus?Object(U.jsx)(te,{componentName:function(t){return e.componentName(t)}}):null]}),Object(U.jsxs)("div",{className:"xj-wrapper",style:{zIndex:"1"},children:[Object(U.jsxs)("div",{className:[4,8].includes(this.state.showType)&&2==this.state.activeNavStatus?"xj-center-small":"xj-center",children:[Object(U.jsxs)("div",{children:[Object(U.jsx)("img",{className:"perimg",onClick:this.reduceFn.bind(this),src:[2,3].includes(this.state.activeNavStatus)?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/preBtn.png":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/pre.png"}),Object(U.jsx)("img",{className:"nextimg",onClick:this.addFn.bind(this),src:[1,2].includes(this.state.activeNavStatus)?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/nextBtn.png":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/next.png"})]}),Object(U.jsxs)("div",{className:"editor-main",ref:this.canvasImgDom,style:{display:1==this.state.activeNavStatus?"block":"none"},children:[Object(U.jsx)("div",{className:"xj-viewer-title",children:Object(U.jsx)("span",{className:"xj-viewer-title-line",children:0==this.state.mouldType&&3!=this.state.showType?this.state.systemTitle:this.state.model.title})}),Object(U.jsx)("div",{className:"xj-viewer-toolbar",style:{bottom:"0px"}}),Object(U.jsx)("div",{className:"xj-viewer-bg",children:Object(U.jsx)("div",{className:"xj-viewer-out",children:Object(U.jsxs)("div",{className:"xj-viewer-mask",style:{background:this.state.model.bg_color},ref:this.canvasImgDomScr,children:[Object(U.jsx)("div",{className:"top",children:Object(U.jsx)("img",{crossOrigin:"anonymous",src:this.state.model.top_image?this.state.model.top_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/59ba305520d3229e7fc53d5229bfec0c.png",id:"top"},this.state.model.top_image)}),Object(U.jsxs)("div",{className:"center",id:"center",children:[Object(U.jsx)("img",{crossOrigin:"anonymous",id:"center-img",src:8==this.state.showType?this.state.model.white_image?this.state.model.white_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20221107/2c407b6b702ed2217e22f8df8a7c87e6.png":this.state.model.middle_image?this.state.model.middle_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20221107/2c407b6b702ed2217e22f8df8a7c87e6.png"}),Object(U.jsxs)("div",{className:"dflexajc ipt-user",children:[Object(U.jsxs)("div",{style:{color:this.state.model.font_color},children:["\u8bf7\u8f93\u5165",[1,8].includes(this.state.showType)?"\u624b\u673a\u53f7":"\u5151\u6362\u7801"]}),Object(U.jsx)("div",{className:"ipt-code",style:{color:this.state.model.font_color},children:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"})]}),[1,8].includes(this.state.showType)?Object(U.jsx)("img",{src:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220127/22e5d4c1b1190a0a7bc8db43e1490d67.png",className:"verifycode"}):Object(U.jsx)("img",{crossOrigin:"anonymous",src:"http://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/7dafa511638b084f21966b2c3d269a0e.png",className:"verifycode"})]}),Object(U.jsx)("div",{className:"bottom",children:this.state.model.describe&&0==this.state.model.describe.type?null:this.state.model.describe&&1==this.state.model.describe.type?Object(U.jsx)("img",{src:this.state.model.describe.bg_image,crossOrigin:"anonymous"}):Object(U.jsxs)("div",{className:"editbg",children:[this.state.model.describe&&this.state.model.describe.bg_image?Object(U.jsx)("img",{src:this.state.model.describe.bg_image,crossOrigin:"anonymous",className:"bgimg"}):null,this.state.model.describe&&this.state.model.describe.content?Object(U.jsx)("div",{dangerouslySetInnerHTML:{__html:this.state.model.describe.content}}):null]})})]})})})]}),2!=this.state.activeNavStatus?null:this.state.activeshow&&2==this.state.product_list.describe.type&&this.state.product_list.describe.content?Object(U.jsx)(q.a,{backPrepage:function(t){return e.showactiveIcon(t)},goodsdata:this.state.product_list}):Object(U.jsx)(H.a,{opendesc:function(t){return e.setState({activeshow:!0})},goodsdata:this.state.product_list}),3!=this.state.activeNavStatus?null:this.state.detailactiveshow&&2==this.state.product_detail.describe.type&&this.state.product_detail.describe.content?Object(U.jsx)(q.a,{backPrepage:function(t){return e.showactivedetail(t)},goodsdata:this.state.product_detail}):Object(U.jsxs)("div",{children:[Object(U.jsx)("div",{className:"details_type",children:Object(U.jsxs)(O.a,{onChange:function(t){e.ondetailTypeChange(t)},value:this.state.detailType,children:[Object(U.jsx)(C.a,{value:1,children:"\u6743\u76ca"}),Object(U.jsx)(C.a,{value:2,children:"\u7acb\u51cf\u91d1"}),![4,8].includes(this.state.showType)&&Object(U.jsx)(C.a,{value:3,children:"\u7ea2\u5305"})]})}),this.returnComponents()]})]}),Object(U.jsx)("div",{className:"xj-center-fixed",style:{marginLeft:"288px"}}),Object(U.jsx)("div",{className:"xj-rightPanel",children:Object(U.jsx)("div",{className:"RootEditor",children:Object(U.jsxs)("div",{children:[[1,3].includes(this.state.showType)?Object(U.jsx)("div",{className:"control page-title-control",children:1==this.state.activeNavStatus?Object(U.jsx)("h1",{style:{fontSize:"16px"},children:"\u843d\u5730\u9875\u8bbe\u7f6e"}):2==this.state.activeNavStatus?Object(U.jsx)("h1",{style:{fontSize:"16px"},children:"\u5546\u54c1\u5217\u8868\u9875\u8bbe\u7f6e"}):Object(U.jsx)("h1",{style:{fontSize:"16px"},children:"\u5546\u54c1\u8be6\u60c5\u9875\u8bbe\u7f6e"})}):null,3==this.state.showType?1==this.state.activeNavStatus?Object(U.jsx)(B,{landConfig:function(t){return e.getlandConfig(t)},setbanner:function(t){return e.getLandingdata(t)}}):2==this.state.activeNavStatus?Object(U.jsx)(M,{setexplainConfig:function(t){return e.getexplainConfig(t)},setGoodConfig:function(t){return e.getGoodConfig(t)}}):1==this.state.detailType?Object(U.jsx)(z,{setdetailActive:function(t){return e.getdetailActiveFn(t)},setGoodDetailConfig:function(t){return e.getGoodDetailConfig(t)}}):Object(U.jsx)(Y,{}):1==this.state.showType?1==this.state.activeNavStatus?Object(U.jsx)(K,{landTitle:this.state.model.title,mouldType:this.state.mouldType,landConfig:function(t){return e.getlandConfig(t)},setbanner:function(t){return e.getLandingdata(t)}}):2==this.state.activeNavStatus?Object(U.jsx)(V,{setexplainConfig:function(t){return e.getexplainConfig(t)},setGoodConfig:function(t){return e.getGoodConfig(t)}}):1==this.state.detailType?Object(U.jsx)(Q,{setdetailActive:function(t){return e.getdetailActiveFn(t)},setGoodDetailConfig:function(t){return e.getGoodDetailConfig(t)}}):Object(U.jsx)(Y,{}):1==this.state.activeNavStatus?Object(U.jsx)(be,{landConfig:function(t){return e.getlandConfig(t)},setbanner:function(t){return e.getLandingdata(t)},couponType:this.state.showType}):2==this.state.activeNavStatus?Object(U.jsx)(me,{componentName:this.state.componentOfconfig,setexplainConfig:function(t){return e.getexplainConfig(t)},setGoodConfig:function(t){return e.getGoodConfig(t)}}):1==this.state.detailType?1==this.state.activeNavStatus?Object(U.jsx)(z,{setdetailActive:function(t){return e.getdetailActiveFn(t)},setGoodDetailConfig:function(t){return e.getGoodDetailConfig(t)}}):Object(U.jsx)(Z,{setdetailActive:function(t){return e.getdetailActiveFn(t)},setGoodDetailConfig:function(t){return e.getGoodDetailConfig(t)}}):1==this.state.activeNavStatus?Object(U.jsx)(Y,{}):Object(U.jsx)($,{setReduceFontcolor:function(t){return e.getReduceFontcolor(t)},setReduceButtoncolor:function(t){return e.getReduceButtoncolor(t)}}),this.state.preview_visible?Object(U.jsx)(_.a,{previewData:this.state.previewData,showType:this.state.showType,onCloseFn:this.onClose.bind(this)}):null,this.state.loading_visible?Object(U.jsxs)("div",{className:"loadingShow",children:[Object(U.jsx)("div",{className:"modal model44"}),Object(U.jsx)(y.a,{loading:!0,icon:"circle",iconSize:64,iconText:"\u4fdd\u5b58\u4e2d",className:"save_loading"})]}):null]})})})]})]})}}]),o}(j.a.Component)}}]);