chunk-c9785a54.35abccee.js 14 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c9785a54"],{"03ecd":function(t,e,a){t.exports=a.p+"view_admin/img/mobilehead.1c931282.png"},"0d25":function(t,e,a){},3137:function(t,e,a){"use strict";a.r(e);var i=a("a34a"),r=a.n(i),s=a("d708"),o=a("b562"),n=a("2f62"),l=a("c42b"),c=a("c276");function d(t,e,a,i,r,s,o){try{var n=t[s](o),l=n.value}catch(t){return void a(t)}n.done?e(l):Promise.resolve(l).then(i,r)}function m(t){return function(){var e=this,a=arguments;return new Promise((function(i,r){var s=t.apply(e,a);function o(t){d(s,i,r,o,n,"next",t)}function n(t){d(s,i,r,o,n,"throw",t)}o(void 0)}))}}function u(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function p(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var f={name:"follow",components:{newsCategory:l.a},props:{activeName:{type:String,default:""},keywordSave:{type:String,default:""}},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:"",data:{content:"",src:"",list:[]},id:0},fileUrl:s.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())},activeName:{handler:function(t){var e=this;switch(t){case"1":this.formValidate.key="subscribe",this.details();break;case"3":this.formValidate.key="default",this.details();break;default:"0"===this.keywordSave?(this.labelarr=[],this.$nextTick((function(){e.$refs.formValidate.resetFields()}))):(this.formValidate.key=this.keywordSave,this.details())}},immediate:!0}},computed:{imgUrl:function(){var t=s.a.apiBaseURL.indexOf("/adminapi/");return s.a.apiBaseURL.substring(0,t)}},mounted:function(){this.getToken()},methods:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?u(a,!0).forEach((function(e){p(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):u(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(n.b)("admin/page",["close"]),{goBack:function(){this.$emit("follow-action")},getCentList:function(t){this.formValidate.data.list=t.new,this.modals=!1},addlabel:function(){this.val&&(-1===this.labelarr.indexOf(this.val)&&this.labelarr.push(this.val),this.val="")},handleClose:function(t,e){var a=this.labelarr.indexOf(e);this.labelarr.splice(a,1)},details:function(){var t=this,e="",a={};this.keywordSave?(e="app/wechat/keyword/"+this.keywordSave,a={}):(e="app/wechat/reply",a={key:{key:this.formValidate.key}}),Object(o.f)(e,a).then(function(){var e=m(r.a.mark((function e(a){var i,s;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=a.data.info||{},s=i.data||{},t.formValidate={status:i.status,type:i.type,key:i.key,data:{content:s.content,src:s.src,list:s.list},id:i.id},t.keywordSave&&(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){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 "+c.a.cookies.get("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;var a={};e.keywordSave?(e.formValidate.key=e.labelarr.join(","),a={url:"app/wechat/keyword/"+e.keywordSave,key:e.formValidate}):a={url:"app/wechat/keyword/"+e.formValidate.id,key:e.formValidate},Object(o.g)(a).then(function(){var t=m(r.a.mark((function t(a){return r.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.keywordSave&&"0"===this.keywordSave?this.$Modal.confirm({title:"提示",content:"<p>是否继续添加?</p>",okText:"是",cancelText:"否",loading:!0,onOk:function(){setTimeout((function(){t.$Modal.remove(),t.labelarr=[],t.val="",t.$refs.formValidate.resetFields()}),1e3)},onCancel:function(){setTimeout((function(){t.$Modal.remove(),t.goBack()}),500)}}):this.keywordSave&&"0"!==this.keywordSave&&(this.$Modal.remove(),this.goBack())}})},v=(a("65f4"),a("2877")),g=Object(v.a)(f,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.keywordSave?i("div",{staticClass:"i-layout-page-header"},[i("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[i("div",{attrs:{slot:"title"},slot:"title"},[i("Button",{staticClass:"mr20",attrs:{icon:"ios-arrow-back",size:"small"},on:{click:t.goBack}},[t._v("返回")])],1)])],1):t._e(),i("Card",{attrs:{bordered:!1,padding:30,"dis-hover":""}},[i("Row",{attrs:{gutter:24,type:"flex"}},[i("Col",{attrs:{span:"24"}},[i("Row",[i("Col",{attrs:{span:24}},[i("Row",[i("Col",{staticClass:"left mb15",attrs:{xl:7,lg:7,md:22,sm:22,xs:22}},[i("img",{staticClass:"top",attrs:{src:a("03ecd")}}),i("img",{staticClass:"bottom",attrs:{src:a("58b1")}}),i("div",{staticClass:"centent"},[i("div",{staticClass:"time-wrapper"},[i("span",{staticClass:"time"},[t._v("9:36")])]),"news"!==t.formValidate.type?i("div",{staticClass:"view-item text-box clearfix"},[i("div",{staticClass:"avatar fl"},[i("img",{attrs:{src:a("47952")}})]),i("div",{staticClass:"box-content fl"},["text"===t.formValidate.type?i("span",{domProps:{textContent:t._s(t.formValidate.data.content)}}):t._e(),t.formValidate.data.src?i("div",{staticClass:"box-content_pic"},[i("img",{attrs:{src:t.formValidate.data.src?t.imgUrl+t.formValidate.data.src:""}})]):t._e()])]):t._e(),"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",style:{backgroundImage:"url("+e.image_input[0]+")",backgroundSize:"100% 100%"}}),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(),0!==e.image_input.length?i("div",{staticClass:"news_cent_img"},[i("img",{attrs:{src:e.image_input[0]}})]):t._e()])])})),0):t._e()])]),i("Col",{attrs:{xl:11,lg:12,md:22,sm:22,xs:22}},[i("Row",[i("Col",{staticClass:"userAlert",attrs:{span:"24"}},[i("div",{staticClass:"box-card right"},[i("Form",{ref:"formValidate",staticClass:"mt20",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":100},nativeOn:{submit:function(t){t.preventDefault()}}},[t.keywordSave?i("FormItem",{attrs:{label:"关键字:",prop:"val"}},[i("div",{staticClass:"arrbox"},[t._l(t.labelarr,(function(e,a){return i("Tag",{key:a,attrs:{name:e,closable:!0},on:{"on-close":t.handleClose}},[t._v(t._s(e)+"\n ")])})),i("input",{directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],staticClass:"arrbox_ip percentage9",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(e)},input:function(e){e.target.composing||(t.val=e.target.value)}}})],2)]):t._e(),i("FormItem",{attrs:{label:"消息状态:"}},[i("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[i("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),i("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1),i("FormItem",{attrs:{label:"消息类型:",prop:"type"}},[i("Select",{staticClass:"percentage9",attrs:{placeholder:"请选择消息状态"},on:{"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("Option",{attrs:{value:"text"}},[t._v("文字消息")]),i("Option",{attrs:{value:"image"}},[t._v("图片消息")]),i("Option",{attrs:{value:"news"}},[t._v("图文消息")]),i("Option",{attrs:{value:"voice"}},[t._v("声音消息")])],1)],1),"text"===t.formValidate.type?i("FormItem",{attrs:{label:"消息内容:",prop:"content"}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.formValidate.data.content,expression:"formValidate.data.content"}],staticClass:"percentage9",attrs:{placeholder:"请填写消息内容"},domProps:{value:t.formValidate.data.content},on:{input:function(e){e.target.composing||t.$set(t.formValidate.data,"content",e.target.value)}}})]):t._e(),"news"===t.formValidate.type?i("FormItem",{attrs:{label:"选取图文:"}},[i("Button",{attrs:{type:"info"},on:{click:t.changePic}},[t._v("选择图文消息")])],1):t._e(),"image"===t.formValidate.type||"voice"===t.formValidate.type?i("FormItem",{attrs:{label:"image"===t.formValidate.type?"图片地址:":"语音地址:",prop:"src"}},[i("div",{staticClass:"acea-row row-middle"},[i("Input",{staticClass:"mr15",staticStyle:{width:"70%"},attrs:{readonly:"readonly",placeholder:"请上传文件"},model:{value:t.formValidate.data.src,callback:function(e){t.$set(t.formValidate.data,"src",e)},expression:"formValidate.data.src"}}),i("Upload",{staticClass:"mr20",staticStyle:{"margin-top":"1px"},attrs:{"show-upload-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}},[i("Button",{attrs:{type:"primary"}},[t._v("上传")])],1)],1),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格式")]),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)]),i("Col",{attrs:{span:24}},[i("div",{staticClass:"acea-row row-center"},[i("Button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],staticClass:"mr20",attrs:{type:"primary"},on:{click:function(e){return t.submenus("formValidate")}}},[t._v("保存并发布\n ")])],1)])],1)],1)],1)],1)],1)],1)],1)],1),i("Modal",{staticClass:"modelBox",attrs:{scrollable:"",title:"发送消息",width:"1200",height:"800","footer-hide":""},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[t.modals?i("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,"b93a6106",null);e.default=g.exports},47952:function(t,e,a){t.exports=a.p+"view_admin/img/head.cfd4b538.gif"},"58b1":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAAyCAIAAACib5WDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE1NEJCMUE0NzZGNDExRTVBOTBBQTZFOEFEMjc4NTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE1NEJCMUE1NzZGNDExRTVBOTBBQTZFOEFEMjc4NTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVm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