text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a2c9c0c2"],{"1da1":function(t,r,e){"use strict";e.d(r,"a",(function(){return o}));e("d3b7"),e("e6cf");function n(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void e(s)}u.done?r(c):Promise.resolve(c).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise((function(o,i){var a=t.apply(r,e);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)}))}}},"4fdb":function(t,r,e){"use strict";var n=e("c5a5"),o=e.n(n);o.a},"96cf":function(t,r,e){var n=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){var o=r&&r.prototype instanceof g?r:g,i=Object.create(o.prototype),a=new F(n||[]);return i._invoke=_(t,e,a),i}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(n){return{type:"throw",arg:n}}}t.wrap=c;var f="suspendedStart",l="suspendedYield",p="executing",h="completed",d={};function g(){}function m(){}function v(){}var y={};y[i]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==e&&n.call(b,i)&&(y=b);var x=v.prototype=g.prototype=Object.create(y);function L(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function E(t,r){function e(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"===typeof l&&n.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var o;function i(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}this._invoke=i}function _(t,r,e){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return N()}e.method=o,e.arg=i;while(1){var a=e.delegate;if(a){var u=k(a,e);if(u){if(u===d)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=h,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var c=s(t,r,e);if("normal"===c.type){if(n=e.done?h:l,c.arg===d)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=h,e.method="throw",e.arg=c.arg)}}}function k(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function O(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(t){if(t){var e=t[i];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){while(++o<t.length)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:N}}function N(){return{value:r,done:!0}}return m.prototype=x.constructor=v,v.constructor=m,v[u]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"===typeof t&&t.constructor;return!!r&&(r===m||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},L(E.prototype),E.prototype[a]=function(){return this},t.AsyncIterator=E,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new E(c(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(x),x[u]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){while(r.length){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0],r=t.completion;if("throw"===r.type)throw r.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,r){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&&r&&(this.next=r),d},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;O(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},a55b:function(t,r,e){"use strict";e.r(r);var n=function(){var t=this,r=t.$createElement,n=t._self._c||r;return n("div",{staticClass:"login"},[n("div",{staticClass:"login-box"},[n("img",{attrs:{src:e("cf05")}}),n("el-form",{ref:"loginRef",attrs:{model:t.loginForm,rules:t.loginRule}},[n("el-form-item",{attrs:{prop:"username"}},[n("el-input",{attrs:{placeholder:"用户名"},model:{value:t.loginForm.username,callback:function(r){t.$set(t.loginForm,"username","string"===typeof r?r.trim():r)},expression:"loginForm.username"}},[n("i",{staticClass:"iconfont iconuser1",attrs:{slot:"prefix"},slot:"prefix"})])],1),n("el-form-item",{attrs:{prop:"password"}},[n("el-input",{attrs:{type:"password",placeholder:"密码"},model:{value:t.loginForm.password,callback:function(r){t.$set(t.loginForm,"password","string"===typeof r?r.trim():r)},expression:"loginForm.password"}},[n("i",{staticClass:"iconfont iconwodemima",attrs:{slot:"prefix"},slot:"prefix"})])],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.login}},[t._v("登录")])],1),n("div",{staticClass:"tip"},[n("div",[t._v("温馨提示：")]),n("div",[t._v("未登录过的新用户，自动注册")]),n("div",[t._v("注册过的用户可凭账号密码登录")])])],1)],1)])},o=[],i=(e("96cf"),e("1da1")),a=e("c1fb"),u={data:function(){return{loginForm:{username:"",password:""},loginRule:{username:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:2,max:14,message:"用户名在2~14个字符",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:5,message:"密码不得少于5个字符",trigger:"blur"}]}}},methods:{login:function(){var t=this;this.$refs.loginRef.validate(function(){var r=Object(i["a"])(regeneratorRuntime.mark((function r(e){var n,o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return",!1);case 2:return r.prev=2,r.next=5,Object(a["n"])(t.loginForm);case 5:n=r.sent,o=n.data,200===o.meta.status&&(t.$message.success(o.meta.message),sessionStorage.setItem("token",o.data),t.$router.push("/")),r.next=12;break;case 10:r.prev=10,r.t0=r["catch"](2);case 12:case"end":return r.stop()}}),r,null,[[2,10]])})));return function(t){return r.apply(this,arguments)}}())}}},c=u,s=(e("4fdb"),e("2877")),f=Object(s["a"])(c,n,o,!1,null,"2e6c4766",null);r["default"]=f.exports},c1fb:function(t,r,e){"use strict";e.d(r,"n",(function(){return f})),e.d(r,"f",(function(){return l})),e.d(r,"m",(function(){return p})),e.d(r,"g",(function(){return h})),e.d(r,"o",(function(){return d})),e.d(r,"t",(function(){return g})),e.d(r,"a",(function(){return m})),e.d(r,"s",(function(){return v})),e.d(r,"w",(function(){return y})),e.d(r,"e",(function(){return w})),e.d(r,"l",(function(){return b})),e.d(r,"d",(function(){return x})),e.d(r,"k",(function(){return L})),e.d(r,"r",(function(){return E})),e.d(r,"v",(function(){return _})),e.d(r,"j",(function(){return k})),e.d(r,"b",(function(){return j})),e.d(r,"p",(function(){return O})),e.d(r,"u",(function(){return F})),e.d(r,"i",(function(){return P})),e.d(r,"h",(function(){return N})),e.d(r,"q",(function(){return R})),e.d(r,"c",(function(){return S}));e("d3b7");var n=e("8bbf"),o=e.n(n),i=e("cebe"),a=e.n(i),u=e("a18c"),c=a.a.create({baseURL:Object({NODE_ENV:"production",BASE_URL:"/admin/"}).VUE_APP_DEV_API||"/api/admin/"});c.interceptors.request.use((function(t){return sessionStorage.getItem("token")&&(t.headers.Authorization="Bearer "+sessionStorage.getItem("token")),t}),(function(t){return Promise.reject(t)})),c.interceptors.response.use((function(t){return t}),(function(t){return t.response||o.a.prototype.$message.error("无法连接服务器"),t.response.data.meta&&o.a.prototype.$message.error(t.response.data.meta.message),401===t.response.status&&u["a"].push("/login"),Promise.reject(t)}));var s=c;function f(t){return s.post("login",t)}function l(t){return s.get("admins",{params:t})}function p(t){return s.get("users",{params:t})}function h(){return s.get("shops/category")}function d(t){return s.post("shops/category",t)}function g(t,r){return s.put("shops/category/".concat(t),r)}function m(t){return s.delete("shops/category/".concat(t))}function v(t){return s.post("shops/subCategory",t)}function y(t,r){return s.put("shops/subCategory/".concat(t),r)}function w(t){return s.delete("shops/subCategory/".concat(t))}function b(t){return s.get("shops",{params:t})}function x(t){return s.delete("shops/".concat(t))}function L(t){return s.get("/shops/".concat(t))}function E(t){return s.post("/shops",t)}function _(t,r){return s.put("shops/".concat(t),r)}function k(t){return s.get("goods",{params:t})}function j(t){return s.delete("goods/".concat(t))}function O(t){return s.post("goods",t)}function F(t,r){return s.put("goods/".concat(t),r)}function P(t){return s.get("goods/".concat(t))}function N(t){return s.get("goods/category/".concat(t))}function R(t){return s.post("goods/category",t)}function S(t){return s.delete("goods/category/".concat(t))}},c5a5:function(t,r,e){},cf05:function(t,r,e){t.exports=e.p+"img/logo.82b9c7a5.png"}}]);
  //# sourceMappingURL=chunk-a2c9c0c2.c20026c7.js.map