启程易购后端代码
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.
 
 
 
 
 
 
qicheng_shop_backend/public/system/js/chunk-f1eea91e.ad1ad5e8.js

1 lines
10 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f1eea91e"],{"016c":function(t,e,a){"use strict";a("e574")},1336:function(t,e,a){"use strict";a.d(e,"h",(function(){return r})),a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"l",(function(){return s})),a.d(e,"e",(function(){return c})),a.d(e,"k",(function(){return l})),a.d(e,"i",(function(){return u})),a.d(e,"f",(function(){return d})),a.d(e,"a",(function(){return m})),a.d(e,"g",(function(){return f})),a.d(e,"d",(function(){return p})),a.d(e,"j",(function(){return g}));var i=a("0c6d");function r(){return i["a"].get("system/article/category/lst")}function n(){return i["a"].get("system/article/category/select")}function o(){return i["a"].get("system/article/category/create/form")}function s(t){return i["a"].get("system/article/category/update/form/".concat(t))}function c(t){return i["a"].delete("system/article/category/delete/".concat(t))}function l(t,e){return i["a"].post("system/article/category/status/".concat(t),{status:e})}function u(t){return i["a"].get("system/article/article/lst",t)}function d(t){return i["a"].get("system/article/article/detail/".concat(t))}function m(t){return i["a"].post("system/article/article/create",t)}function f(t,e){return i["a"].post("system/article/article/update/".concat(e),t)}function p(t){return i["a"].delete("system/article/article/delete/".concat(t))}function g(t,e){return i["a"].post("system/article/article/status/".concat(t),{status:e})}},c3b3:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",[a("el-page-header",{attrs:{content:t.$route.params.id?"编辑文章":"添加文章"},on:{back:t.back}})],1),t._v(" "),a("el-card",{staticClass:"box-card mt14"},[a("el-form",{ref:"formValidate",staticClass:"form",attrs:{size:"small",model:t.formValidate,"label-width":"100px",rules:t.ruleValidate},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"文章信息",name:"first"}}),t._v(" "),a("el-tab-pane",{attrs:{label:"文章内容",name:"second"}})],1),t._v(" "),"first"==t.activeName?a("el-row",{attrs:{gutter:10}},[a("el-col",t._b({},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"标题:",prop:"title","label-for":"title"}},[a("el-input",{staticStyle:{width:"90%"},attrs:{placeholder:"请输入","element-id":"title"},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"作者:",prop:"author","label-for":"author"}},[a("el-input",{staticStyle:{width:"90%"},attrs:{placeholder:"请输入",maxLength:"32","element-id":"author"},model:{value:t.formValidate.author,callback:function(e){t.$set(t.formValidate,"author",e)},expression:"formValidate.author"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"文章分类:","label-for":"cid",prop:"cid"}},[a("el-select",{ref:"configSelect",staticClass:"mb15",staticStyle:{width:"90%"},attrs:{clearable:"",placeholder:"请选择"},model:{value:t.formValidate.cid,callback:function(e){t.$set(t.formValidate,"cid",e)},expression:"formValidate.cid"}},t._l(t.treeData,(function(e,i){return a("el-option",{key:i,attrs:{label:e.title,value:e.article_category_id}},[t._v("\n "+t._s(e.title)+"\n ")])})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"文章简介:",prop:"synopsis","label-for":"synopsis"}},[a("el-input",{staticStyle:{width:"90%"},attrs:{type:"textarea",placeholder:"请输入"},model:{value:t.formValidate.synopsis,callback:function(e){t.$set(t.formValidate,"synopsis",e)},expression:"formValidate.synopsis"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"图文封面:",prop:"image_input"}},[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("1")}}},[t.formValidate.image_input?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.formValidate.image_input}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"iconfont iconjiahao"})])])]),t._v(" "),a("el-form-item",{attrs:{label:"是否显示:"}},[a("el-radio-group",{model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[a("el-radio",{staticClass:"radio",attrs:{label:1}},[t._v("显示")]),t._v(" "),a("el-radio",{attrs:{label:0}},[t._v("不显示")])],1)],1)],1)],1):t._e(),t._v(" "),a("el-row",[a("el-col",["second"==t.activeName?a("el-form-item",{attrs:{label:"文章内容:",prop:"content"}},[a("vue-ueditor-wrap",{staticStyle:{width:"90%"},attrs:{config:t.myConfig},on:{beforeInit:t.addCustomDialog},model:{value:t.formValidate.content,callback:function(e){t.$set(t.formValidate,"content",e)},expression:"formValidate.content"}})],1):t._e()],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"footer"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.onsubmit("formValidate")}}},[t._v("提交")])],1)],1)},r=[],n=a("c80c"),o=(a("96cf"),a("3b8d")),s=(a("7f7f"),a("1336")),c=a("6625"),l=a.n(c),u=a("bbcc"),d=a("5f87"),m=a("83d6"),f={name:"EditArticle",components:{VueUeditorWrap:l.a},data:function(){var t=this,e=u["a"].https+"/upload/image/0/file?ueditor=1&token="+Object(d["a"])(),a=function(e,a,i){t.formValidate.image_input?i():i(new Error("请上传图文封面"))},i=function(e,a,i){t.formValidate.cid?i():i(new Error("请选择文章分类"))};return{myConfig:{autoHeightEnabled:!1,initialFrameHeight:500,initialFrameWidth:"100%",enableAutoSave:!1,UEDITOR_HOME_URL:"/UEditor/",serverUrl:e,imageUrl:e,imageFieldName:"file",imageUrlPrefix:"",imageActionName:"upfile",imageMaxSize:2048e3,imageAllowFiles:[".png",".jpg",".jpeg",".gif",".bmp"]},activeName:"first",roterPre:m["roterPre"],sleOptions:{title:"",article_category_id:""},defaultProps:{children:"children",label:"title"},list:[],treeData:[],grid:{xl:12,lg:12,md:12,sm:24,xs:24},formValidate:{cid:"",title:"",author:"",image_input:"",content:"",synopsis:"",url:"",is_hot:0,is_banner:0,status:0},ruleValidate:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],author:[{required:!0,message:"请输入作者",trigger:"blur"}],cid:[{required:!0,validator:i,trigger:"change"}],image_input:[{required:!0,validator:a,trigger:"change"}],content:[{required:!0,message:"请输入文章内容",trigger:"change"}]},tempRoute:{}}},watch:{$route:function(t,e){this.$route.params.id?this.getDetails():this.formValidate={title:"",author:"",image_input:"",content:"",synopsis:"",url:"",is_hot:0,is_banner:0,status:0}}},created:function(){this.tempRoute=Object.assign({},this.$route)},mounted:function(){this.getList(),this.$route.params.id&&(this.setTagsViewTitle(),this.getDetails())},methods:{back:function(){this.$router.push({path:"".concat(m["roterPre"],"/cms/article")})},getList:function(){var t=this;Object(s["b"])().then((function(e){t.treeData=e.data})).catch((function(e){t.$message.error(e.message)}))},modalPicTap:function(t){var e=this;this.$modalUpload((function(t){e.formValidate.image_input=t[0]}),t)},handleSelClick:function(t){this.formValidate.cid=t.article_category_id,this.sleOptions={title:t.title,article_category_id:t.article_category_id},this.$refs.configSelect.blur()},onsubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;e.$route.params.id?Object(s["g"])(e.formValidate,e.$route.params.id).then(function(){var t=Object(o["a"])(Object(n["a"])().mark((function t(a){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$message.success(a.message),setTimeout((function(){e.$router.push({path:"".concat(m["roterPre"],"/cms/article")})}),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(s["a"])(e.formValidate).then(function(){var t=Object(o["a"])(Object(n["a"])().mark((function t(a){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$message.success(a.message),setTimeout((function(){e.$router.push({path:"".concat(m["roterPre"],"/cms/article")})}),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)}))}))},getDetails:function(){var t=this;Object(s["f"])(this.$route.params.id?this.$route.params.id:0).then(function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(a){var i;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=a.data,t.formValidate={cid:i.cid,title:i.title,author:i.author,image_input:i.image_input,content:i.content&&i.content.content,synopsis:i.synopsis,url:i.url,is_hot:i.is_hot,is_banner:i.is_banner,status:i.status};case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$message.error(e.message)}))},setTagsViewTitle:function(){var t="编辑文章",e=Object.assign({},this.tempRoute,{title:"".concat(t,"-").concat(this.$route.params.id)});this.$store.dispatch("tagsView/updateVisitedView",e)},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var a=new window.UE.ui.Dialog({iframeUrl:m["roterPre"]+"/admin/widget/image?field=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1200px;height:500px;padding:20px;"});this.dialog=a;var i=new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;",onclick:function(){a.render(),a.open()}});return i}),37),window.UE.registerUI("video-dialog",(function(t,e){var a=new window.UE.ui.Dialog({iframeUrl:m["roterPre"]+"/admin/widget/video?fodder=video",editor:t,name:e,title:"上传视频",cssRules:"width:800px;height:420px;padding:10px 20px 20px;"});this.dialog=a;var i=new window.UE.ui.Button({name:"video-button",title:"上传视频",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -320px -20px;",onclick:function(){a.render(),a.open()}});return i}),38)}}},p=f,g=(a("016c"),a("2877")),h=Object(g["a"])(p,i,r,!1,null,"cbfb17d6",null);e["default"]=h.exports},e574:function(t,e,a){}}]);