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
23 KiB
1 lines
23 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2bd0ff06"],{"056a":function(t,e){t.exports="data:image/png;base64,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"},"8dcc":function(t,e,r){},b562:function(t,e,r){"use strict";r.d(e,"l",(function(){return o})),r.d(e,"n",(function(){return i})),r.d(e,"D",(function(){return a})),r.d(e,"h",(function(){return c})),r.d(e,"j",(function(){return s})),r.d(e,"m",(function(){return u})),r.d(e,"y",(function(){return l})),r.d(e,"a",(function(){return p})),r.d(e,"x",(function(){return h})),r.d(e,"s",(function(){return d})),r.d(e,"t",(function(){return f})),r.d(e,"C",(function(){return m})),r.d(e,"g",(function(){return g})),r.d(e,"i",(function(){return A})),r.d(e,"k",(function(){return v})),r.d(e,"d",(function(){return y})),r.d(e,"e",(function(){return b})),r.d(e,"f",(function(){return w})),r.d(e,"z",(function(){return E})),r.d(e,"B",(function(){return C})),r.d(e,"A",(function(){return Q})),r.d(e,"H",(function(){return j})),r.d(e,"o",(function(){return O})),r.d(e,"c",(function(){return B})),r.d(e,"G",(function(){return x})),r.d(e,"E",(function(){return I})),r.d(e,"F",(function(){return P})),r.d(e,"w",(function(){return L})),r.d(e,"u",(function(){return F})),r.d(e,"v",(function(){return k})),r.d(e,"p",(function(){return G})),r.d(e,"b",(function(){return T})),r.d(e,"r",(function(){return S})),r.d(e,"q",(function(){return D}));var n=r("b6bd");function o(t){return Object(n.a)({url:"app/routine",method:"get",params:t})}function i(){return Object(n.a)({url:"app/routine/syncSubscribe",method:"GET"})}function a(){return Object(n.a)({url:"app/wechat/syncSubscribe",method:"GET"})}function c(){return Object(n.a)({url:"app/routine/create",method:"get"})}function s(t){return Object(n.a)({url:"app/routine/".concat(t,"/edit"),method:"get"})}function u(t){return Object(n.a)({url:"app/routine/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function l(t){return Object(n.a)({url:"app/wechat/menu",method:"get"})}function p(t){return Object(n.a)({url:"app/wechat/menu",method:"post",data:t})}function h(t){return Object(n.a)({url:"app/wechat/template",method:"get",params:t})}function d(){return Object(n.a)({url:"app/wechat/template/create",method:"get"})}function f(t){return Object(n.a)({url:"app/wechat/template/".concat(t,"/edit"),method:"get"})}function m(t){return Object(n.a)({url:"app/wechat/template/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function g(t){return Object(n.a)({url:t.url,method:"post",data:t.key})}function A(t){return Object(n.a)({url:"app/routine/download",method:"post",data:t})}function v(){return Object(n.a)({url:"app/routine/info",method:"get"})}function y(t){return Object(n.a)({url:"app/wechat/keyword",method:"get",params:t})}function b(t){return Object(n.a)({url:"app/wechat/keyword/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function w(t,e){return Object(n.a)({url:t,method:"get",params:e.key})}function E(t){return Object(n.a)({url:"/app/wechat/news",method:"POST",data:t})}function C(t){return Object(n.a)({url:"app/wechat/news",method:"GET",params:t})}function Q(t){return Object(n.a)({url:"app/wechat/news/".concat(t),method:"GET"})}function j(t){return Object(n.a)({url:"app/wechat/user",method:"GET",params:t})}function O(){return Object(n.a)({url:"app/wechat/user/tag_group",method:"GET"})}function B(t){return Object(n.a)({url:t,method:"GET"})}function x(){return Object(n.a)({url:"app/wechat/tag",method:"GET"})}function I(){return Object(n.a)({url:"app/wechat/tag/create",method:"GET"})}function P(t){return Object(n.a)({url:"app/wechat/tag/".concat(t,"/edit"),method:"GET"})}function L(){return Object(n.a)({url:"app/wechat/group",method:"GET"})}function F(){return Object(n.a)({url:"app/wechat/group/create",method:"GET"})}function k(t){return Object(n.a)({url:"app/wechat/group/".concat(t,"/edit"),method:"GET"})}function G(t){return Object(n.a)({url:"app/wechat/action",method:"GET",params:t})}function T(t){return Object(n.a)({url:"app/wechat/code_reply/".concat(t),method:"GET"})}function S(){return Object(n.a)({url:"/app/wechat/card",method:"GET"})}function D(t){return Object(n.a)({url:"/app/wechat/card",method:"post",data:t})}},d9fa:function(t,e,r){"use strict";r.r(e);var n=r("2f62"),o=r("a069"),i=r("b0e7"),a=r("b562"),c=r("d708");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new F(n||[]);return o(a,"_invoke",{value:x(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var f="suspendedStart",m="suspendedYield",g="executing",A="completed",v={};function y(){}function b(){}function w(){}var E={};p(E,a,(function(){return this}));var C=Object.getPrototypeOf,Q=C&&C(C(k([])));Q&&Q!==r&&n.call(Q,a)&&(E=Q);var j=w.prototype=y.prototype=Object.create(E);function O(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,c){var u=d(t[o],t,i);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==s(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(p).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function x(e,r,n){var o=f;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===A){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=I(c,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=A,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var u=d(e,r,n);if("normal"===u.type){if(o=n.done?A:m,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=A,n.method="throw",n.arg=u.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function k(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(s(e)+" is not iterable")}return b.prototype=w,o(j,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=p(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,p(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},O(B.prototype),p(B.prototype,c,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),p(j,l,"Generator"),p(j,a,(function(){return this})),p(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=k,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function l(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){l(i,n,o,a,c,"next",t)}function c(t){l(i,n,o,a,c,"throw",t)}a(void 0)}))}}function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var m={name:"newsCategorySave",components:{uploadPictures:i.a,WangEditor:o.a},watch:{$route:function(t,e){"0"!==this.$route.params.id?this.info():(this.list=[{title:"",author:"",synopsis:"",image_input:"",content:"",id:0}],this.saveForm=this.list[this.current])}},data:function(){var t=this;return{roterPre:c.a.roterPre,val:"",ruleValidate:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],author:[{required:!0,message:"请输入作者",trigger:"blur"}],image_input:[{required:!0,validator:function(e,r,n){t.saveForm.image_input?n():n(new Error("请上传图文封面"))},trigger:"change"}],content:[{required:!0,message:"请输入正文",trigger:"change"}],synopsis:[{required:!0,message:"请输入文章摘要",trigger:"blur"}]},isChoice:"单选",dragging:null,isDel:!1,msg:"",count:[],baseImg:r("056a"),saveForm:{title:"",author:"",synopsis:"",image_input:"",content:"",id:0},current:0,list:[{title:"",author:"",synopsis:"",image_input:"",content:"",id:0}],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}}},computed:d(d({},Object(n.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){"0"!==this.$route.params.id?this.info():this.saveForm=this.list[this.current]},methods:d(d({},Object(n.b)("admin/page",["close"])),{},{getEditorContent:function(t){this.saveForm.content=t},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var r=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.images/index.html?fodder=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1200px;height:500px;padding:20px;"});return this.dialog=r,new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;",onclick:function(){r.render(),r.open()}})}),37)},modalPicTap:function(){this.modalPic=!0},getPic:function(t){this.saveForm.image_input=t.att_dir,this.modalPic=!1},handleAdd:function(){if(!this.check())return!1;this.list.push({title:"",author:"",synopsis:"",image_input:"",content:"",id:0})},onSubSave:function(t){var e=this;this.current=t,this.list.map((function(t,r){if(r===e.current)return e.saveForm=e.list[e.current]}))},del:function(t){0===t?this.$Message.warning("不能再删除了"):(this.list.splice(t,1),this.saveForm={})},info:function(){var t=this;Object(a.A)(this.$route.params.id).then(function(){var e=p(u().mark((function e(r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data.info,t.list=n.new,t.val=t.list[t.current].content,t.saveForm=t.list[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.msg)}))},subFrom:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;var r={id:e.$route.params.id||0,list:e.list};Object(a.z)(r).then(function(){var t=p(u().mark((function t(r){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg),setTimeout((function(){e.$router.push({path:"".concat(e.roterPre,"/app/wechat/news_category/index")})}),500);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))}))},check:function(){for(var t in this.list)return this.list[t].title?this.list[t].author?this.list[t].synopsis?this.list[t].image_input?!!this.list[t].content||(this.$Message.warning("请输入文章的内容"),!1):(this.$Message.warning("请输入文章的图文封面"),!1):(this.$Message.warning("请输入文章的摘要"),!1):(this.$Message.warning("请输入文章的作者"),!1):(this.$Message.warning("请输入文章的标题"),!1)}})},g=(r("e1be"),r("2877")),A=Object(g.a)(m,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"newsBox"},[e("div",{staticClass:"i-layout-page-header"},[e("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("router-link",{attrs:{to:{path:"".concat(t.roterPre,"/app/wechat/news_category/index")}}},[e("div",{staticClass:"font-sm after-line"},[e("span",{staticClass:"iconfont iconfanhui"}),e("span",{staticClass:"pl10"},[t._v("返回")])])]),e("span",{staticClass:"mr20",domProps:{textContent:t._s(t.$route.meta.title)}})],1)])],1),e("Card",{staticClass:"save_from ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Row",{attrs:{type:"flex",gutter:24}},[e("Col",{attrs:{xl:6,lg:6,md:12,sm:24,xs:24}},[t._l(t.list,(function(r,n){return e("div",{key:n},[0===n?e("div",{class:{checkClass:n===t.current},on:{click:function(e){return t.onSubSave(n)},mouseenter:function(e){t.isDel=!0},mouseleave:function(e){t.isDel=!1}}},[e("div",{staticClass:"news_pic",style:{backgroundImage:"url("+(r.image_input?r.image_input:t.baseImg)+")",backgroundSize:"100% 100%"}},[e("Button",{directives:[{name:"show",rawName:"v-show",value:t.isDel,expression:"isDel"}],attrs:{type:"error",shape:"circle",icon:"md-trash"},on:{click:function(e){return t.del(n)}}})],1),e("span",{staticClass:"news_sp"},[t._v(t._s(r.title))])]):e("div",{staticClass:"news_cent",class:{checkClass:n===t.current},on:{click:function(e){return t.onSubSave(n)}}},[e("span",{staticClass:"news_sp1"},[t._v(t._s(r.title))]),e("div",{staticClass:"news_cent_img ivu-mr-8"},[e("img",{attrs:{src:r.image_input?r.image_input:t.baseImg}})]),e("Button",{attrs:{type:"error",shape:"circle",icon:"md-trash"},on:{click:function(e){return t.del(n)}}})],1)])})),e("div",{staticClass:"acea-row row-center-wrapper"},[e("Button",{staticClass:"mt20",attrs:{icon:"ios-download-outline",type:"primary"},on:{click:t.handleAdd}},[t._v("添加图文")])],1)],2),e("Col",{attrs:{xl:18,lg:18,md:12,sm:24,xs:24}},[e("Form",{ref:"saveForm",staticClass:"saveForm",attrs:{model:t.saveForm,"label-width":t.labelWidth,rules:t.ruleValidate,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{attrs:{gutter:24,type:"flex"}},[e("Col",{staticClass:"ml40",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"标题:",prop:"title"}},[e("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),e("Col",{staticClass:"ml40",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"作者:",prop:"author"}},[e("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),e("Col",{staticClass:"ml40",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"摘要:",prop:"synopsis"}},[e("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),e("Col",{staticClass:"ml40",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"图文封面:",prop:"image_input"}},[e("div",{staticClass:"picBox",on:{click:function(e){return t.modalPicTap("单选")}}},[t.saveForm.image_input?e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:t.saveForm.image_input}})]):e("div",{staticClass:"upLoad acea-row row-center-wrapper"},[e("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)])]),e("FormItem",{attrs:{label:"正文:",prop:"content"}},[e("WangEditor",{staticStyle:{width:"90%"},attrs:{content:t.val},on:{editorContent:t.getEditorContent}})],1)],1),e("Col",{staticClass:"ml40",attrs:{span:"24"}},[e("FormItem",[e("Button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.subFrom("saveForm")}}},[t._v("提交")])],1)],1),e("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传文章图","mask-closable":!1,"z-index":1},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1)],1)],1)],1)],1)],1)],1)}),[],!1,null,"11d1407d",null);e.default=A.exports},e1be:function(t,e,r){"use strict";r("8dcc")}}]); |