徐总多门店
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
15 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-593148ec"],{1336:function(t,e,r){"use strict";r.d(e,"e",(function(){return o})),r.d(e,"d",(function(){return i})),r.d(e,"f",(function(){return a})),r.d(e,"a",(function(){return c})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return s})),r.d(e,"h",(function(){return l})),r.d(e,"g",(function(){return f}));var n=r("b6bd");function o(t){return Object(n.a)({url:"cms/cms",method:"get",params:t})}function i(t){return Object(n.a)({url:"cms/cms",method:"post",data:t})}function a(t){return Object(n.a)({url:"cms/cms/".concat(t),method:"get"})}function c(){return Object(n.a)({url:"cms/category/create",method:"GET"})}function u(t){return Object(n.a)({url:"cms/category",method:"GET",params:t})}function s(t){return Object(n.a)({url:"cms/category/".concat(t,"/edit"),method:"GET"})}function l(t){return Object(n.a)({url:"cms/category/set_status/".concat(t.id,"/").concat(t.status),method:"put"})}function f(t,e){return Object(n.a)({url:"cms/cms/relation/".concat(e),method:"put",data:t})}},"780f":function(t,e,r){},"9ace":function(t,e,r){"use strict";r.r(e);var n=r("2f62"),o=r("1336"),i=r("d708");function a(t){return(a="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 c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=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:{},u=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:S(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 p="suspendedStart",m="suspendedYield",v="executing",y="completed",g={};function b(){}function w(){}function O(){}var x={};f(x,u,(function(){return this}));var j=Object.getPrototypeOf,L=j&&j(j(V([])));L&&L!==r&&n.call(L,u)&&(x=L);var _=O.prototype=b.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,c,u){var s=d(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(s.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 S(e,r,n){var o=p;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=d(e,r,n);if("normal"===s.type){if(o=n.done?y:m,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function P(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,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;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,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function V(e){if(e||""===e){var r=e[u];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(a(e)+" is not iterable")}return w.prototype=O,o(_,"constructor",{value:O,configurable:!0}),o(O,"constructor",{value:w,configurable:!0}),w.displayName=f(O,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},E(k.prototype),f(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(_),f(_,l,"Generator"),f(_,u,(function(){return this})),f(_,"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=V,T.prototype={constructor:T,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(I),!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 u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)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,g):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),g},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),I(r),g}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:V(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function u(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)}))}}function l(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 f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d={name:"articleCategory",data:function(){return{roterPre:i.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,formValidate:{status:"",page:1,limit:20,type:0},total:0,columns1:[{title:"ID",key:"id",width:80},{title:"分类昵称",key:"title",minWidth:130},{title:"分类图片",slot:"images",minWidth:130},{title:"状态",slot:"statuss",minWidth:130},{title:"操作",slot:"action",fixed:"right",minWidth:120}],FromData:null,modalTitleSs:"",categoryId:0,categoryList:[]}},computed:f(f({},Object(n.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getList()},methods:f(f({},Object(n.d)("admin/userLevel",["getCategoryId"])),{},{add:function(){var t=this;this.$modalForm(Object(o.a)()).then((function(){return t.getList()}))},edit:function(t){var e=this;this.$modalForm(Object(o.b)(t.id)).then((function(){return e.getList()}))},del:function(t,e){var r=this,n={title:e,num:0,url:"cms/category/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){r.$Message.success(t.msg),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(o.c)(this.formValidate).then(function(){var e=s(c().mark((function e(r){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.categoryList=n.list,t.total=n.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},userSearchs:function(){this.formValidate.page=1,this.getList()},onchangeIsShow:function(t){var e=this,r={id:t.id,status:t.status};Object(o.h)(r).then(function(){var t=s(c().mark((function t(r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},lookUp:function(t){this.$router.push({path:"".concat(this.roterPre,"/cms/article/index"),query:{id:t.id}}),this.getCategoryId(t.id)}})},p=(r("e8a4"),r("2877")),m=Object(p.a)(d,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"formValidate",attrs:{model:t.formValidate,inline:"","label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"是否显示:","label-for":"status"}},[e("Select",{staticClass:"input-add",attrs:{placeholder:"请选择","element-id":"status",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[e("Option",{attrs:{value:"all"}},[t._v("全部")]),e("Option",{attrs:{value:"1"}},[t._v("显示")]),e("Option",{attrs:{value:"0"}},[t._v("不显示")])],1)],1),e("FormItem",{attrs:{label:"分类昵称:",prop:"title","label-for":"status2"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入分类昵称"},on:{"on-search":t.userSearchs},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}}),e("Button",{staticClass:"mr10",attrs:{type:"primary"},on:{click:function(e){return t.userSearchs()}}},[t._v("查询")])],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["cms-category-create"],expression:"['cms-category-create']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加文章分类")]),e("vxe-table",{staticClass:"ivu-mt",attrs:{"highlight-hover-row":"",loading:t.loading,"header-row-class-name":"false","tree-config":{children:"children"},data:t.categoryList}},[e("vxe-table-column",{attrs:{field:"id",title:"ID",tooltip:"",width:"80"}}),e("vxe-table-column",{attrs:{field:"title",title:"分类昵称","min-width":"130"}}),e("vxe-table-column",{attrs:{field:"image",title:"分类图片","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(t){var r=t.row;return[e("viewer",[e("div",{staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.image,expression:"row.image"}]})])])]}}])}),e("vxe-table-column",{attrs:{field:"status",title:"状态","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(r){var n=r.row;return[e("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}}])}),e("vxe-table-column",{attrs:{field:"date",title:"操作",align:"center",width:"250",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(r){var n=r.row;return[e("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(n,"删除文章分类")}}},[t._v("删除")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.lookUp(n)}}},[t._v("查看文章")])]}}])})],1)],1)],1)}),[],!1,null,"4d8f8274",null);e.default=m.exports},e8a4:function(t,e,r){"use strict";r("780f")}}]);