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.
 
 
 
 
 
crmeb_php/public/system/js/chunk-8f1f2890.f0f73f87.js

1 lines
10 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8f1f2890"],{"056a":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAACUCAYAAAB1GVf9AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABBKADAAQAAAABAAAAlAAAAAD7OG/zAAAH8ElEQVR4Ae3dWXPUOBQGUGcYoKCAByi2///f2LewE5bAzVSXIBPfdu8y9/gFpdVedKT+4pbtcHRycnI6WAgQIPBL4B8KBAgQWAgIhIWEfwkQcIZgDBAg0AScITQLJQLlBQRC+SEAgEATEAjNQolAeQGBUH4IACDQBARCs1AiUF5AIJQfAgAINAGB0CyUCJQXEAjlhwAAAk1AIDQLJQLlBQRC+SEAgEATEAjNQolAeQGBUH4IACDQBARCs1AiUF5AIJQfAgAINAGB0CyUCJQXEAjlhwAAAk1AIDQLJQLlBQRC+SEAgEATEAjNQolAeQGBUH4IACDQBARCs1AiUF5AIJQfAgAINAGB0CyUCJQXEAjlhwAAAk1AIDQLJQLlBQRC+SEAgEATEAjNQolAeQGBUH4IACDQBARCs1AiUF5AIJQfAgAINAGB0CyUCJQXEAjlhwAAAk1AIDQLJQLlBQRC+SEAgEATEAjNQolAeQGBUH4IACDQBARCs1AiUF5AIJQfAgAINAGB0CyUCJQXEAjlhwAAAk1AIDQLJQLlBQRC+SEAgEATEAjNQolAeQGBUH4IACDQBARCs1AiUF5AIJQfAgAINAGB0CyUCJQXEAjlhwAAAk1AIDQLJQLlBQRC+SEAgEATEAjNQolAeQGBUH4IACDQBP5tRaW5CLx//374+PHjcHJyMnz//n24dOnScOXKleH69evDjRs35tIMx9mhwNGvQXXa4XE5pAsEvn79Orx8+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PuMfpzh+OrQ3+ATCP31yf+OKCYE48Mfv/V/X+I3bFw9+P2BpJjFj2v+c1h6/DozB7ddHqP/uWmXulvYdoRA9ts+zhziKkL85yzxF5LiDMJCYF0BgbCu3I7Xi1PqVa4QxHvj+QOX9HbcMX/55gVChx0cXwHWmXQTBh125swOSSB01mERBL5bd9YphQ7HpGJnnS0MOuuQYocjEIp1uOYSyAQEQqajjkAxAYFQrMM1l0AmIBAyHXUEigkIhGIdrrkEMgGBkOmoI1BMwF9dLtbhmksgE3CGkOmoI1BMQCAU63DNJZAJCIRMRx2BYgICoViHay6BTEAgZDrqCBQTEAjFOlxzCWQCAiHTUUegmIBAKNbhmksgExAImY46AsUEBEKxDtdcApmAQMh01BEoJiAQinW45hLIBARCpqOOQDEBgVCswzWXQCYgEDIddQSKCQiEYh2uuQQyAYGQ6agjUExAIBTrcM0lkAkIhExHHYFiAgKhWIdrLoFMQCBkOuoIFBMQCMU6XHMJZAICIdNRR6CYgEAo1uGaSyATEAiZjjoCxQQEQrEO11wCmYBAyHTUESgmIBCKdbjmEsgEBEKmo45AMQGBUKzDNZdAJiAQMh11BIoJCIRiHa65BDIBgZDpqCNQTEAgFOtwzSWQCQiETEcdgWICAqFYh2sugUxAIGQ66ggUExAIxTpccwlkAgIh01FHoJiAQCjW4ZpLIBMQCJmOOgLFBARCsQ7XXAKZgEDIdNQRKCYgEIp1uOYSyAQEQqajjkAxAYFQrMM1l0AmIBAyHXUEigkIhGIdrrkEMgGBkOmoI1BMQCAU63DNJZAJCIRMRx2BYgICoViHay6BTEAgZDrqCBQTEAjFOlxzCWQCPwEYef7DpS5s4AAAAABJRU5ErkJggg=="},"12d1":function(t,e,s){"use strict";s("976e")},"976e":function(t,e,s){},cb5c:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"divBox"},[s("el-card",{staticClass:"box-card"},[s("router-link",{attrs:{to:{path:t.roterPre+"/app/wechat/newsCategory"}}},[s("el-button",{staticClass:"mr20 mb20",attrs:{size:"mini",icon:"el-icon-back"}},[t._v("返回")])],1),t._v(" "),s("el-row",{staticClass:"save_from",attrs:{type:"flex",gutter:24}},[s("el-col",{attrs:{xl:6,lg:6,md:12,sm:24,xs:24}},[t._l(t.data,(function(e,a){return s("div",{key:a},[0===a?s("div",{class:{checkClass:a===t.current},on:{click:function(e){return t.onSubSave(a)},mouseenter:function(e){t.isDel=!0},mouseleave:function(e){t.isDel=!1}}},[s("div",{staticClass:"news_pic",style:{backgroundImage:"url("+(e.image_input?e.image_input:t.baseImg)+")",backgroundSize:"100% 100%"}},[s("el-button",{directives:[{name:"show",rawName:"v-show",value:t.isDel,expression:"isDel"}],attrs:{type:"danger",circle:"",icon:"el-icon-delete"},on:{click:function(e){return t.del(a)}}})],1),t._v(" "),s("span",{staticClass:"news_sp"},[t._v(t._s(e.title))])]):s("div",{staticClass:"news_cent",class:{checkClass:a===t.current},on:{click:function(e){return t.onSubSave(a)}}},[s("span",{staticClass:"news_sp1"},[t._v(t._s(e.title))]),t._v(" "),s("div",{staticClass:"news_cent_img ivu-mr-8"},[s("img",{attrs:{src:e.image_input?e.image_input:t.baseImg}})]),t._v(" "),s("el-button",{attrs:{type:"danger",circle:"",icon:"md-trash"},on:{click:function(e){return t.del(a)}}})],1)])})),t._v(" "),s("div",{staticClass:"acea-row row-center-wrapper"},[s("el-button",{staticClass:"mt20",attrs:{icon:"ios-download-outline",type:"primary"},on:{click:t.handleAdd}},[t._v("添加图文")])],1)],2),t._v(" "),s("el-col",{attrs:{xl:18,lg:18,md:12,sm:24,xs:24}},[s("el-form",{ref:"saveForm",staticClass:"saveForm",attrs:{model:t.saveForm,"label-width":"100px",rules:t.ruleValidate},nativeOn:{submit:function(t){t.preventDefault()}}},[s("el-row",{attrs:{gutter:24}},[s("el-col",{staticClass:"ml40",attrs:{span:24}},[s("el-form-item",{attrs:{label:"标题:",prop:"title"}},[s("el-input",{staticStyle:{width:"60%"},attrs:{type:"text",placeholder:"请输入文章标题"},model:{value:t.saveForm.title,callback:function(e){t.$set(t.saveForm,"title",e)},expression:"saveForm.title"}})],1)],1),t._v(" "),s("el-col",{staticClass:"ml40",attrs:{span:24}},[s("el-form-item",{attrs:{label:"作者:",prop:"author"}},[s("el-input",{staticStyle:{width:"60%"},attrs:{type:"text",placeholder:"请输入作者名称"},model:{value:t.saveForm.author,callback:function(e){t.$set(t.saveForm,"author",e)},expression:"saveForm.author"}})],1)],1),t._v(" "),s("el-col",{staticClass:"ml40",attrs:{span:24}},[s("el-form-item",{attrs:{label:"摘要:",prop:"synopsis"}},[s("el-input",{staticStyle:{width:"60%"},attrs:{type:"textarea",placeholder:"请输入摘要"},model:{value:t.saveForm.synopsis,callback:function(e){t.$set(t.saveForm,"synopsis",e)},expression:"saveForm.synopsis"}})],1)],1),t._v(" "),s("el-col",{staticClass:"ml40",attrs:{span:24}},[s("el-form-item",{attrs:{label:"图文封面:",prop:"image_input"}},[s("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("单选")}}},[t.saveForm.image_input?s("div",{staticClass:"pictrue"},[s("img",{attrs:{src:t.saveForm.image_input}})]):s("div",{staticClass:"upLoad"},[s("i",{staticClass:"el-icon-camera cameraIconfont"})])])]),t._v(" "),s("el-form-item",{attrs:{label:"正文:",prop:"content"}},[s("ueditor-from",{attrs:{content:t.saveForm.content},model:{value:t.saveForm.content,callback:function(e){t.$set(t.saveForm,"content",e)},expression:"saveForm.content"}})],1)],1),t._v(" "),s("el-col",{staticClass:"ml40",attrs:{span:24}},[s("el-form-item",[s("el-button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.subFrom("saveForm")}}},[t._v("提交")])],1)],1)],1)],1)],1)],1)],1)],1)},r=[],n=(s("7f7f"),s("c80c")),i=(s("96cf"),s("3b8d")),o=s("ef0d"),c=s("b562"),A=s("83d6"),l={name:"Save",components:{ueditorFrom:o["a"]},data:function(){var t=this,e=function(e,s,a){t.saveForm.image_input?a():a(new Error("请上传图文封面"))};return{roterPre:A["roterPre"],ruleValidate:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],author:[{required:!0,message:"请输入作者",trigger:"blur"}],image_input:[{required:!0,validator:e,trigger:"change"}],content:[{required:!0,message:"请输入正文",trigger:"change"}],synopsis:[{required:!0,message:"请输入文章摘要",trigger:"blur"}]},isChoice:"单选",dragging:null,isDel:!1,msg:"",count:[],baseImg:s("056a"),saveForm:{title:"",author:"",synopsis:"",image_input:"",content:""},current:0,data:[{title:"",author:"",synopsis:"",image_input:"",content:""}],uploadList:[],modalPic:!1,gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8}}},watch:{$route:function(t,e){this.$route.params.id&&this.info()}},mounted:function(){this.$route.params.id&&this.info()},methods:{modalPicTap:function(){var t=this;t.$modalUpload((function(e){t.saveForm.image_input=e[0]}))},handleAdd:function(){if(!this.check())return!1;var t={title:"",author:"",synopsis:"",image_input:"",content:""};this.data.push(t)},onSubSave:function(t){var e=this;this.current=t,this.data.map((function(t,s){s===e.current&&(e.saveForm=e.data[e.current])}))},del:function(t){0===t?this.$message.warning("不能再删除了"):(this.data.splice(t,1),this.saveForm={})},info:function(){var t=this;Object(c["y"])(this.$route.params.id).then(function(){var e=Object(i["a"])(Object(n["a"])().mark((function e(s){var a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=s.data,t.data=a.article,t.data.map((function(t){t.content=t.content.content})),t.saveForm=t.data[t.current];case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))},subFrom:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;var s=[e.saveForm];s=""===e.current?s:e.data,e.$route.params.id?Object(c["z"])(e.$route.params.id,e.data).then(function(){var t=Object(i["a"])(Object(n["a"])().mark((function t(s){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$message.success(s.message),setTimeout((function(){e.$router.push({path:"".concat(A["roterPre"],"/app/wechat/newsCategory")})}),500);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.message)})):Object(c["x"])([e.saveForm]).then(function(){var t=Object(i["a"])(Object(n["a"])().mark((function t(s){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$message.success(s.message),setTimeout((function(){e.$router.push({path:"".concat(A["roterPre"],"/app/wechat/newsCategory")})}),500);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.message)}))}))},check:function(){for(var t in this.data)return this.data[t].title?this.data[t].author?this.data[t].synopsis?this.data[t].image_input?!!this.data[t].content||(this.$message.warning("请输入文章的内容"),!1):(this.$message.warning("请输入文章的图文封面"),!1):(this.$message.warning("请输入文章的摘要"),!1):(this.$message.warning("请输入文章的作者"),!1):(this.$message.warning("请输入文章的标题"),!1)}}},u=l,m=(s("12d1"),s("2877")),d=Object(m["a"])(u,a,r,!1,null,"d7634800",null);e["default"]=d.exports}}]);