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-9214a140"],{"03ecd":function(t,e,a){t.exports=a.p+"system_static/img/mobilehead.1c931282.png"},3137:function(t,e,a){"use strict";a.r(e);var i=a("c7eb"),s=a("1da1"),r=(a("d9e2"),a("14d9"),a("a434"),a("a15b"),a("d708")),l=a("b562"),o=a("c42b"),n=a("c276"),c=(o={name:"follow",components:{newsCategory:o.a},data:function(){var t=this;return{delfromData:{},isShow:!1,maxCols:4,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:[]},id:0},fileUrl:r.a.apiBaseURL+"/file/upload/1",ruleValidate:{val:[{required:!0,validator:function(e,a,i){0===t.labelarr.length?i(new Error("请输入后回车")):i()},trigger:"change"}],type:[{required:!0,message:"请选择消息类型",trigger:"change"}],content:[{required:!0,validator:function(e,a,i){"text"===t.formValidate.type&&(""===t.formValidate.data.content?i(new Error("请填写规则内容")):i())},trigger:"blur"}],src:[{required:!0,validator:function(e,a,i){"image"===t.formValidate.type&&""===t.formValidate.data.src?i(new Error("请上传")):i()},trigger:"change"}]},labelarr:[]}},watch:{$route:function(t,e){this.$route.params.key||"0"!==this.$route.params.id?(this.formValidate.key=this.$route.params.key,this.details()):(this.labelarr=[],this.$refs.formValidate.resetFields())}},computed:{imgUrl:function(){var t=r.a.apiBaseURL.indexOf("/adminapi/");return r.a.apiBaseURL.substring(0,t)}},mounted:function(){this.getToken(),(this.$route.params.key||this.$route.params.id&&"0"!==this.$route.params.id)&&this.details()},methods:{getCentList:function(t){this.formValidate.data.list=t.new,this.modals=!1},addlabel:function(){-1===this.labelarr.indexOf(this.val)&&this.labelarr.push(this.val),this.val=""},handleClose:function(t){t=this.labelarr.indexOf(t),this.labelarr.splice(t,1)},details:function(){var t=this,e="",a={};a=this.$route.params.id?(e="app/wechat/keyword/"+this.$route.params.id,{}):(e="app/wechat/reply",{key:{key:this.formValidate.key}});Object(l.h)(e,a).then(function(){var e=Object(s.a)(Object(i.a)().mark((function e(a){var s,r;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.data.info.data instanceof Array)return t.formValidate.status=0,e.abrupt("return");e.next=3;break;case 3:s=a.data.info||{},r=s.data||{},t.formValidate={status:s.status,type:s.type,key:s.key,data:{content:r.content,src:r.src,list:r.list},id:s.id},t.$route.params.id&&(t.labelarr=t.formValidate.key.split(",")||[]);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.msg)}))},changePic:function(){this.modals=!0},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=""}},getToken:function(){this.header["Authori-zation"]="Bearer "+Object(n.c)("token")},handleSuccess:function(t,e){200===t.status?(this.formValidate.data.src=t.data.src,this.$message.success(t.msg)):this.$message.error(t.msg)},handleFormatError:function(t){"image"===this.formValidate.type?this.$message.warning("请上传bmp/png/jpeg/jpg/gif格式的图片"):this.$message.warning("请上传mp3/wma/wav/amr格式的语音")},handleMaxSize:function(t){this.$message.warning("请上传文件2M以内的文件")},submenus:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;t={},t=e.$route.params.id?(e.formValidate.key=e.labelarr.join(","),{url:"app/wechat/keyword/"+e.$route.params.id,key:e.formValidate}):{url:"app/wechat/keyword/"+e.formValidate.id,key:e.formValidate},Object(l.i)(t).then(function(){var t=Object(s.a)(Object(i.a)().mark((function t(a){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.operation(),e.$message.success(a.msg);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.msg)}))}))},operation:function(){var t=this;this.$route.params.id&&"0"===this.$route.params.id?this.$msgbox({title:"提示",message:"是否继续添加",showCancelButton:!0,cancelButtonText:"否",confirmButtonText:"是",iconClass:"el-icon-warning",confirmButtonClass:"btn-custom-cancel"}).then((function(){setTimeout((function(){t.labelarr=[],t.val="",t.$refs.formValidate.resetFields()}),1e3)})).catch((function(){setTimeout((function(){t.$router.push({path:t.$routeProStr+"/app/wechat/reply/keyword"})}),500)})):this.$route.params.id&&"0"!==this.$route.params.id&&this.$router.push({path:this.$routeProStr+"/app/wechat/reply/keyword"})}}},a("6e26"),a("2877"));c=Object(c.a)(o,(function(){var t=this,e=t._self._c;return e("div",[e("pages-header",{ref:"pageHeader",attrs:{title:t.$route.meta.title,backUrl:t.$routeProStr+"/app/wechat/reply/keyword"}}),e("el-card",{staticClass:"ivu-mt-16",attrs:{bordered:!1,shadow:"never"}},[e("el-row",{attrs:{gutter:24}},[e("el-col",{staticClass:"ml40",attrs:{span:24}},[e("el-col",{attrs:{span:24}},[e("el-col",{staticClass:"left mb15",attrs:{xl:7,lg:7,md:22,sm:22,xs:22}},[e("img",{staticClass:"top",attrs:{src:a("03ecd")}}),e("img",{staticClass:"bottom",attrs:{src:a("58b1")}}),e("div",{staticClass:"centent"},[e("div",{staticClass:"time-wrapper"},[e("span",{staticClass:"time"},[t._v("9:36")])]),"news"!==t.formValidate.type?e("div",{staticClass:"view-item text-box clearfix"},[e("div",{staticClass:"avatar fl"},[e("img",{attrs:{src:a("4795")}})]),e("div",{staticClass:"box-content fl"},["text"===t.formValidate.type?e("span",{domProps:{textContent:t._s(t.formValidate.data.content)}}):t._e(),t.formValidate.data.src?e("div",{staticClass:"box-content_pic"},[e("img",{attrs:{src:t.formValidate.data.src?t.imgUrl+t.formValidate.data.src:""}})]):t._e()])]):t._e(),"news"===t.formValidate.type?e("div",t._l(t.formValidate.data.list,(function(a,i){return e("div",{key:i},[0===i?e("div",[e("div",{staticClass:"news_pic",style:{backgroundImage:"url("+a.image_input[0]+")",backgroundSize:"100% 100%"}}),e("span",{staticClass:"news_sp"},[t._v(t._s(a.title))])]):e("div",{staticClass:"news_cent"},[a.synopsis?e("span",{staticClass:"news_sp1"},[t._v(t._s(a.title))]):t._e(),0!==a.image_input.length?e("div",{staticClass:"news_cent_img"},[e("img",{attrs:{src:a.image_input[0]}})]):t._e()])])})),0):t._e()])]),e("el-col",{attrs:{xl:11,lg:12,md:22,sm:22,xs:22}},[e("el-col",{staticClass:"userAlert",attrs:{span:24}},[e("div",{staticClass:"box-card right"},[e("el-form",{ref:"formValidate",staticClass:"mt20",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":"100px"},nativeOn:{submit:function(t){t.preventDefault()}}},[t.$route.params.id?e("el-form-item",{attrs:{label:"关键字:",prop:"val"}},[e("div",{staticClass:"arrbox"},[t._l(t.labelarr,(function(a,i){return e("el-tag",{key:i,attrs:{name:a,closable:!0},on:{close:function(e){return t.handleClose(a)}}},[t._v(t._s(a)+"\n ")])})),e("input",{directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],staticClass:"arrbox_ip",staticStyle:{width:"90%"},attrs:{placeholder:"输入后回车"},domProps:{value:t.val},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addlabel.apply(null,arguments)},input:function(e){e.target.composing||(t.val=e.target.value)}}})],2)]):t._e(),e("el-form-item",{attrs:{label:"消息状态:"}},[e("el-radio-group",{model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[e("el-radio",{attrs:{label:1}},[t._v("启用")]),e("el-radio",{attrs:{label:0}},[t._v("禁用")])],1)],1),e("el-form-item",{attrs:{label:"消息类型:",prop:"type"}},[e("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"}},[e("el-option",{attrs:{value:"text",label:"文字消息"}}),e("el-option",{attrs:{value:"image",label:"图片消息"}}),e("el-option",{attrs:{value:"news",label:"图文消息"}}),e("el-option",{attrs:{value:"voice",label:"声音消息"}})],1)],1),"text"===t.formValidate.type?e("el-form-item",{attrs:{label:"消息内容:",prop:"content"}},[e("el-input",{staticStyle:{width:"90%"},attrs:{placeholder:"请填写消息内容",type:"textarea",rows:4},model:{value:t.formValidate.data.content,callback:function(e){t.$set(t.formValidate.data,"content",e)},expression:"formValidate.data.content"}})],1):t._e(),"news"===t.formValidate.type?e("el-form-item",{attrs:{label:"选取图文:"}},[e("el-button",{on:{click:t.changePic}},[t._v("选择图文消息")])],1):t._e(),"image"===t.formValidate.type||"voice"===t.formValidate.type?e("el-form-item",{attrs:{label:"image"===t.formValidate.type?"图片地址:":"语音地址:",prop:"src"}},[e("div",{staticClass:"acea-row row-middle"},[e("el-input",{staticClass:"mr15",staticStyle:{width:"75%"},attrs:{readonly:"readonly",placeholder:"default size"},model:{value:t.formValidate.data.src,callback:function(e){t.$set(t.formValidate.data,"src",e)},expression:"formValidate.data.src"}}),e("el-upload",{staticClass:"mr20",staticStyle:{"margin-top":"1px"},attrs:{"show-file-list":!1,action:t.fileUrl,"on-success":t.handleSuccess,format:"image"===t.formValidate.type?t.formatImg:t.formatVoice,"max-size":2048,headers:t.header,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}},[e("el-button",{attrs:{type:"primary"}},[t._v("上传")])],1)],1),e("span",{directives:[{name:"show",rawName:"v-show",value:"image"===t.formValidate.type,expression:"formValidate.type === 'image'"}]},[t._v("文件最大2Mb,支持bmp/png/jpeg/jpg/gif格式")]),e("span",{directives:[{name:"show",rawName:"v-show",value:"voice"===t.formValidate.type,expression:"formValidate.type === 'voice'"}]},[t._v("文件最大2Mb,支持mp3格式,播放长度不超过60s")])]):t._e()],1)],1)]),e("el-col",{attrs:{span:24}},[e("div",{staticClass:"acea-row row-center"},[e("el-button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:function(e){return t.submenus("formValidate")}}},[t._v("保存并发布 ")])],1)])],1)],1)],1)],1)],1),e("el-dialog",{staticClass:"modelBox",attrs:{visible:t.modals,title:"发送消息",width:"1200px","lock-scroll":!1},on:{"update:visible":function(e){t.modals=e}}},[t.modals?e("news-category",{attrs:{scrollerHeight:t.scrollerHeight,contentTop:t.contentTop,contentWidth:t.contentWidth,maxCols:t.maxCols},on:{getCentList:t.getCentList}}):t._e()],1)],1)}),[],!1,null,"586ea1c9",null);e.default=c.exports},4795:function(t,e,a){t.exports=a.p+"system_static/img/head.cfd4b538.gif"},"58b1":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAAyCAIAAACib5WDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlw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