You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
13 KiB
1 lines
13 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-86a07a06"],{"03ecd":function(t,e,a){t.exports=a.p+"system/img/mobilehead.1c931282.png"},"114b":function(t,e,a){},"23b4":function(t,e,a){"use strict";a("114b")},4795:function(t,e,a){t.exports=a.p+"system/img/head.cfd4b538.gif"},"58b1":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAAyCAIAAACib5WDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE1NEJCMUE0NzZGNDExRTVBOTBBQTZFOEFEMjc4NTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE1NEJCMUE1NzZGNDExRTVBOTBBQTZFOEFEMjc4NTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTU0QkIxQTI3NkY0MTFFNUE5MEFBNkU4QUQyNzg1OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTU0QkIxQTM3NkY0MTFFNUE5MEFBNkU4QUQyNzg1OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4yWLBJAAABuklEQVR42uzcu0ocURzA4XWxMIWiQhJwtVhxMW0wEkWj+AwWgm9gJfgggpVPoElEUwUCKRNFJaQWsygWXvAKXlBZGw8KIiIJmWFnGPg+pjiryMIffpxzRLemUqnkUlUul0ulUg74f3kjAAEDAgYEDAIGBAwIGBAwCBgQMCBgEHAMlZub8BglJK825s/vHxzOfl4Ii9GR4devXhooZGYHPjo+mfk0f3l5FZ6wCC8NFDKzA+fz+aHB/scvDRQyE3BzU2N4DBEyeYQGBAxU5wi9sbm1+ut3W2shznucnp296Sx1tBeNGxINeG39z+jIcPy3+Tj3RcCQ9BG6ob7+fjE5NR2eaOugtdBi1pD0Dvzg6vo68hpIOeAXdXWR10CV1Pz9c6F/LC4P9PfGf5ufSysf+nqe/ZbPhYZq3YGfiHD7BdI/Qrv9QuYDdvsFd2B3YEjjDgxk+Aidu/sd1T9vueEUPTE+ZrhgBwai7sA7u3tPvhJtaz0/vzBrSDrg7ndvv377/vAX0dFs7+y+7+4ya0g64I72ov8iAndgQMCAgEHAgIABAYOAAQEDAgYEDAIGBAwIGBAwCBhIy60AAwBiy5esmSYLKgAAAABJRU5ErkJggg=="},b39f:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"divBox"},[i("el-card",{staticClass:"box-card"},[i("router-link",{directives:[{name:"show",rawName:"v-show",value:-1!==t.$route.path.indexOf("keyword"),expression:"$route.path.indexOf('keyword') !== -1"}],attrs:{to:{path:t.roterPre+"/app/wechat/reply/keyword"}}},[i("el-button",{staticClass:"mr20 mb20",attrs:{size:"mini",icon:"el-icon-back"}},[t._v("返回")])],1),t._v(" "),i("el-row",{attrs:{gutter:30}},[i("el-col",t._b({staticClass:"acea-row"},"el-col",t.grid,!1),[i("div",{staticClass:"left mb15 ml40"},[i("img",{staticClass:"top",attrs:{src:a("03ecd")}}),t._v(" "),i("img",{staticClass:"bottom",attrs:{src:a("58b1")}}),t._v(" "),i("div",{staticClass:"centent"},[i("div",{staticClass:"time-wrapper"},[i("span",{staticClass:"time"},[t._v("9:36")])]),t._v(" "),"news"!==t.formValidate.type?i("div",{staticClass:"view-item text-box clearfix"},[i("div",{staticClass:"avatar fl"},[i("img",{attrs:{src:a("4795")}})]),t._v(" "),i("div",{staticClass:"box-content fl"},["text"===t.formValidate.type?i("span",{staticStyle:{"white-space":"pre-wrap"},domProps:{innerHTML:t._s(t.formValidate.data.content)}}):t._e(),t._v(" "),t.formValidate.data.src?i("div",{staticClass:"box-content_pic"},[i("img",{attrs:{src:t.formValidate.data.src?t.httpsURL+t.formValidate.data.src:""}})]):t._e()])]):t._e(),t._v(" "),"news"===t.formValidate.type?i("div",t._l(t.formValidate.data.list,(function(e,a){return i("div",{key:a},[0===a?i("div",[i("div",{staticClass:"news_pic mb15",style:{backgroundImage:"url("+e.image_input+")",backgroundSize:"100% 100%"}}),t._v(" "),i("span",{staticClass:"news_sp"},[t._v(t._s(e.title))])]):i("div",{staticClass:"news_cent"},[e.synopsis?i("span",{staticClass:"news_sp1"},[t._v(t._s(e.title))]):t._e(),t._v(" "),0!==e.image_input.length?i("div",{staticClass:"news_cent_img"},[i("img",{attrs:{src:e.image_input}})]):t._e()])])})),0):t._e()])])]),t._v(" "),i("el-col",{attrs:{xl:11,lg:12,md:14,sm:22,xs:22}},[i("div",{staticClass:"box-card right ml50"},[i("el-form",{ref:"formValidate",staticClass:"mt20",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":"100px"},nativeOn:{submit:function(t){t.preventDefault()}}},[-1!==t.$route.path.indexOf("keyword")?i("el-form-item",{attrs:{label:"关键字:",prop:"val"}},[i("div",{staticClass:"arrbox"},[t._l(t.labelarr,(function(e,a){return i("el-tag",{key:a,staticClass:"mr5",attrs:{type:"success",closable:"","disable-transitions":!1},on:{close:function(a){return t.handleClose(e)}}},[t._v(t._s(e))])})),t._v(" "),i("el-input",{staticClass:"arrbox_ip",staticStyle:{width:"90%"},attrs:{size:"mini",placeholder:"输入后回车"},on:{change:t.addlabel},model:{value:t.val,callback:function(e){t.val=e},expression:"val"}})],2)]):t._e(),t._v(" "),i("el-form-item",{attrs:{label:"规则状态:"}},[i("el-radio-group",{model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[i("el-radio",{attrs:{label:1}},[t._v("启用")]),t._v(" "),i("el-radio",{attrs:{label:0}},[t._v("禁用")])],1)],1),t._v(" "),i("el-form-item",{attrs:{label:"消息类型:",prop:"type"}},[i("el-select",{staticStyle:{width:"90%"},attrs:{placeholder:"请选择规则状态"},on:{change:function(e){return t.RuleFactor(t.formValidate.type)}},model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},[i("el-option",{attrs:{label:"文字消息",value:"text"}},[t._v("文字消息")]),t._v(" "),i("el-option",{attrs:{label:"图片消息",value:"image"}},[t._v("图片消息")]),t._v(" "),i("el-option",{attrs:{label:"图文消息",value:"news"}},[t._v("图文消息")]),t._v(" "),i("el-option",{attrs:{label:"声音消息",value:"voice"}},[t._v("声音消息")])],1)],1),t._v(" "),"text"===t.formValidate.type?i("el-form-item",{attrs:{label:"规则内容:",prop:"content"}},[i("el-input",{staticStyle:{width:"90%"},attrs:{type:"textarea",placeholder:"请填写规则内容"},model:{value:t.formValidate.data.content,callback:function(e){t.$set(t.formValidate.data,"content",e)},expression:"formValidate.data.content"}})],1):t._e(),t._v(" "),"news"===t.formValidate.type?i("el-form-item",{attrs:{label:"选取图文:"}},[i("el-button",{attrs:{type:"primary"},on:{click:t.changePic}},[t._v("选择图文消息")])],1):t._e(),t._v(" "),"image"===t.formValidate.type||"voice"===t.formValidate.type?i("el-form-item",{attrs:{label:"image"===t.formValidate.type?"图片地址:":"语音地址:",prop:"src"}},[i("div",{staticClass:"acea-row row-middle"},[i("el-input",{staticClass:"mr10",staticStyle:{width:"75%"},attrs:{readonly:"readonly",placeholder:""},model:{value:t.formValidate.data.src,callback:function(e){t.$set(t.formValidate.data,"src",e)},expression:"formValidate.data.src"}}),t._v(" "),i("el-upload",{staticClass:"upload-demo mr10",attrs:{action:"image"===t.formValidate.type?t.fileUrl:t.voiceUrl,"on-success":t.handleSuccess,headers:t.myHeaders,"show-file-list":!1}},[i("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1)],1),t._v(" "),i("span",{directives:[{name:"show",rawName:"v-show",value:"image"===t.formValidate.type,expression:"formValidate.type === 'image'"}]},[t._v("文件最大2Mb,支持bmp/png/jpeg/jpg/gif格式")]),t._v(" "),i("span",{directives:[{name:"show",rawName:"v-show",value:"voice"===t.formValidate.type,expression:"formValidate.type === 'voice'"}]},[t._v("文件最大2Mb,支持mp3/wma/wav/amr格式,播放长度不超过60s")])]):t._e()],1)],1),t._v(" "),i("el-col",{attrs:{span:24}},[i("div",{staticClass:"acea-row row-center"},[i("el-button",{staticClass:"ml50",attrs:{type:"primary",loading:t.loading},on:{click:function(e){return t.submenus("formValidate")}}},[t._v("保存并发布")])],1)])],1)],1)],1),t._v(" "),i("el-dialog",{staticClass:"dia",staticStyle:{height:"700px"},attrs:{title:"提示",visible:t.visible,width:"1000px","before-close":t.handleClosePic},on:{"update:visible":function(e){t.visible=e}}},[t.visible?i("news-category",{attrs:{"scroller-height":t.scrollerHeight,"content-top":t.contentTop,"content-width":t.contentWidth,"max-cols":t.maxCols},on:{getCentList:t.getCentList}}):t._e()],1)],1)},s=[],r=(a("7f7f"),a("c80c")),l=(a("28a5"),a("96cf"),a("3b8d")),o=a("5f87"),n=a("b562"),c=a("83d6"),d=a("bbcc"),m=a("c42b"),u={name:"Index",components:{newsCategory:m["a"]},data:function(){var t=this,e=function(e,a,i){"text"===t.formValidate.type&&(""===t.formValidate.data.content?i(new Error("请填写规则内容")):i())},a=function(e,a,i){"image"===t.formValidate.type&&""===t.formValidate.data.src?i(new Error("请上传")):i()},i=function(e,a,i){0===t.labelarr.length?i(new Error("请输入后回车")):i()};return{loading:!1,visible:!1,roterPre:c["roterPre"],grid:{xl:7,lg:12,md:10,sm:24,xs:24},delfromData:{},isShow:!1,maxCols:3,scrollerHeight:"600",contentTop:"130",contentWidth:"98%",modals:!1,val:"",formatImg:["jpg","jpeg","png","bmp","gif"],formatVoice:["mp3","wma","wav","amr"],header:{},formValidate:{status:1,type:"",key:this.$route.params.key||"",data:{content:"",src:"",list:[]}},ruleValidate:{val:[{required:!0,validator:i,trigger:"blur"}],type:[{required:!0,message:"请选择消息类型",trigger:"change"}],content:[{required:!0,validator:e,trigger:"blur"}],src:[{required:!0,validator:a,trigger:"change"}]},labelarr:[],myHeaders:{"X-Token":Object(o["a"])()}}},computed:{fileUrl:function(){return d["a"].https+"/wechat/reply/upload/image"},voiceUrl:function(){return d["a"].https+"/wechat/reply/upload/voice"},httpsURL:function(){return d["a"].httpUrl}},watch:{$route:function(t,e){this.$route.params.key?(this.formValidate.key=this.$route.params.key,this.details()):(this.labelarr=[],this.$refs["formValidate"].resetFields())}},mounted:function(){(this.$route.params.key||this.$route.params.id)&&this.details()},methods:{getCentList:function(t){this.formValidate.data.list=t.article,this.visible=!1},changePic:function(){this.visible=!0},handleClosePic:function(){this.visible=!1},details:function(){var t=this;Object(n["a"])(-1!==this.$route.path.indexOf("keyword")?this.$route.params.id:this.$route.params.key,-1!==this.$route.path.indexOf("keyword")?"":1).then(function(){var e=Object(l["a"])(Object(r["a"])().mark((function e(a){var i;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=a.data||null,t.formValidate={status:i.status,type:i.type,key:i.key,data:{content:i.data.content,src:i.data.src,list:i.data.list},id:i.id},t.$route.params.id&&(t.labelarr=t.formValidate.key.split(",")||[]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){"数据不存在"!==e.message&&t.$message.error(e.message)}))},handleSuccess:function(t){200===t.status?(this.formValidate.data.src=t.data.src,this.$message.success("上传成功")):this.$message.error(t.message)},RuleFactor:function(t){switch(t){case"text":this.formValidate.data.src="",this.formValidate.data.list=[];break;case"news":this.formValidate.data.src="",this.formValidate.data.content="";break;default:this.formValidate.data.list=[],this.formValidate.data.content="",this.formValidate.data.src=""}},handleClose:function(t){var e=this.labelarr.indexOf(t);this.labelarr.splice(e,1)},addlabel:function(){var t=this.labelarr.indexOf(this.val);-1===t&&this.labelarr.push(this.val),this.val=""},submenus:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;e.loading=!0,e.formValidate.key=e.labelarr.join(","),-1!==e.$route.path.indexOf("keyword")?e.$route.params.id?Object(n["e"])(e.$route.params.id,e.formValidate).then(function(){var t=Object(l["a"])(Object(r["a"])().mark((function t(a){return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.loading=!1,e.$message.success(a.message),e.$router.push({path:e.roterPre+"/app/wechat/reply/keyword"});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$message.error(t.message)})):Object(n["c"])(e.formValidate).then(function(){var t=Object(l["a"])(Object(r["a"])().mark((function t(a){return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.loading=!1,e.operation();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$message.error(t.message)})):Object(n["g"])(e.$route.params.key,e.formValidate).then(function(){var t=Object(l["a"])(Object(r["a"])().mark((function t(a){return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.loading=!1,e.$message.success(a.message);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$message.error(t.message)}))}))},operation:function(){var t=this;this.$confirm("继续添加吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){setTimeout((function(){t.labelarr=[],t.val="",t.$refs["formValidate"].resetFields()}),1e3)})).catch((function(){setTimeout((function(){t.$router.push({path:"".concat(c["roterPre"],"/app/wechat/reply/keyword")})}),500)}))}}},p=u,f=(a("23b4"),a("2877")),h=Object(f["a"])(p,i,s,!1,null,"12a4618a",null);e["default"]=h.exports}}]); |