(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-516d32cc"],{"0a5a":function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));const r="admin_token";function s(){return localStorage.getItem("token")}function i(){return localStorage.removeItem(r)}},"1e4b":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-container",[t("el-aside",{class:e.show?"width":"width1"},[t("el-menu",{attrs:{router:"","background-color":"#282c34","text-color":"#fff","default-active":e.$route.path,"default-openeds":e.openeds}},e._l(e.menu,(function(n){return t("div",{key:n.id},[n.children?t("el-submenu",{attrs:{index:n.code}},[t("template",{slot:"title"},[t("span",[e._v(e._s(n.name))])]),e._l(n.children,(function(n){return t("el-menu-item",{key:n.id,attrs:{index:n.code}},[e._v(e._s(n.name))])}))],2):t("el-menu-item",{attrs:{index:n.code}},[t("span",[e._v(e._s(n.name))])])],1)})),0)],1),t("el-main",[t("div",{staticClass:"head"},[t("ul",[t("li",[t("div",{staticClass:"add",on:{click:e.add}},[e.show?t("i",{staticClass:"el-icon-s-unfold"}):t("i",{staticClass:"el-icon-s-fold"})]),t("div",{staticClass:"right"},[t("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},e._l(e.titie,(function(n,r){return t("el-breadcrumb-item",{key:r},[e._v(e._s(n.name))])})),1)],1)]),t("li",[t("div",{staticClass:"token",on:{click:e.hanleLogout}},[e._v("退出")])])])]),t("div",{staticClass:"box-card"},[t("router-view")],1)])],1)],1)],1)},s=[],i=n("0a5a"),a=n("adb5");function o(){return Object(a["a"])({url:"/api/menus",method:"get"})}var u={mounted(){o().then(e=>{this.menu=e.data.data,console.log(this.menu)})},data(){return{menu:[],show:!1,levelData:[],titie:[],head:"",onindex:0,openeds:["GOODS_MANAGE"]}},watch:{$route:{handler:function(e){this.titie=e.matched,this.head=e.name,this.levelData.push({name:e.name,path:e.path});const t=[],n={};for(var r=0;r<this.levelData.length;r++)n[this.levelData[r].name]||(t.push(this.levelData[r]),n[this.levelData[r].name]=!0);this.levelData=t},deep:!0,immediate:!0}},methods:{next(){this.hanletop()},hanletop(){document.getElementById("bottom").scrollIntoView({behavior:"smooth"})},hanlebottom(){document.getElementById("top").scrollIntoView({behavior:"smooth"})},hanleLogout(){Object(i["b"])(),this.$router.push({path:"/Login"})},handlerclick(e){this.$route.path!==e&&this.$router.push({path:e})},add(){this.show=!this.show},hanblDelete(e,t){var n=this.levelData[e].name;if(this.onindex=e,this.levelData.splice(this.onindex,1),t===this.head){var r,s;for(let e=0;e<this.levelData.length;e++)r=this.levelData[e].path,s=this.levelData[e].name;this.levelData.length&&s!==n&&this.$router.push({path:r})}}}},c=u,l=(n("7a0e"),n("0b56")),d=Object(l["a"])(c,r,s,!1,null,"1235132c",null);t["default"]=d.exports},"38bc":function(e,t,n){var r,s;
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
 * @license MIT */(function(i,a){r=a,s="function"===typeof r?r.call(t,n,t,e):r,void 0===s||(e.exports=s)})(0,(function(){var e={version:"0.2.0"},t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function n(e,t,n){return e<t?t:e>n?n:e}function r(e){return 100*(-1+e)}function s(e,n,s){var i;return i="translate3d"===t.positionUsing?{transform:"translate3d("+r(e)+"%,0,0)"}:"translate"===t.positionUsing?{transform:"translate("+r(e)+"%,0)"}:{"margin-left":r(e)+"%"},i.transition="all "+n+"ms "+s,i}e.configure=function(e){var n,r;for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var o=e.isStarted();r=n(r,t.minimum,1),e.status=1===r?null:r;var u=e.render(!o),c=u.querySelector(t.barSelector),l=t.speed,d=t.easing;return u.offsetWidth,i((function(n){""===t.positionUsing&&(t.positionUsing=e.getPositioningCSS()),a(c,s(r,l,d)),1===r?(a(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){a(u,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){e.remove(),n()}),l)}),l)):setTimeout(n,l)})),this},e.isStarted=function(){return"number"===typeof e.status},e.start=function(){e.status||e.set(0);var n=function(){setTimeout((function(){e.status&&(e.trickle(),n())}),t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return t||e.status?e.inc(.3+.5*Math.random()).set(1):this},e.inc=function(t){var r=e.status;return r?("number"!==typeof t&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&e.start(),t++,n++,r.always((function(){n--,0===n?(t=0,e.done()):e.set((t-n)/t)})),this):this}}(),e.render=function(n){if(e.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var s=document.createElement("div");s.id="nprogress",s.innerHTML=t.template;var i,o=s.querySelector(t.barSelector),c=n?"-100":r(e.status||0),l=document.querySelector(t.parent);return a(o,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),t.showSpinner||(i=s.querySelector(t.spinnerSelector),i&&d(i)),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(s),s},e.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(t.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),a=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;var r,s=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);while(s--)if(r=e[s]+i,r in n)return r;return t}function s(e){return e=n(e),t[e]||(t[e]=r(e))}function i(e,t,n){t=s(t),e.style[t]=n}return function(e,t){var n,r,s=arguments;if(2==s.length)for(n in t)r=t[n],void 0!==r&&t.hasOwnProperty(n)&&i(e,n,r);else i(e,s[1],s[2])}}();function o(e,t){var n="string"==typeof e?e:l(e);return n.indexOf(" "+t+" ")>=0}function u(e,t){var n=l(e),r=n+t;o(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=l(e);o(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function l(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e}))},"70e7":function(e,t,n){},"7a0e":function(e,t,n){"use strict";n("e0ce")},adb5:function(e,t,n){"use strict";var r=n("4ff3"),s=n.n(r),i=n("0a5a"),a=n("38bc"),o=n.n(a),u=(n("70e7"),n("5422")),c=(n("a18c"),s.a.create({timeout:1e4}));c.interceptors.request.use(e=>(e.headers.Authorization="Bearer "+Object(i["a"])(),o.a.start(),e),e=>(console.log(e,"222222"),Promise.reject(e))),c.interceptors.response.use(e=>{o.a.done();const t=e.status;if(200===t||201===t)return e},e=>(400===e.response.status&&Object(u["Message"])({message:e.response.data.errorMessage,type:"error"}),500===e.response.status&&Object(u["Message"])({message:e.response.data.message,type:"error"}),Promise.reject(e))),t["a"]=c},e0ce:function(e,t,n){}}]);
//# sourceMappingURL=chunk-516d32cc.5004e058.js.map