text: webpackJsonp([1],{"2hAw":function(e,t,s){"use strict";function n(e){s("nirG")}Object.defineProperty(t,"__esModule",{value:!0});var a=s("oKkF"),r=s("9Re2"),i=s("/Xao"),o=n,u=i(a.a,r.a,!1,o,null,null);t.default=u.exports},"9Re2":function(e,t,s){"use strict";var n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"login"},[e._m(0,!1,!1),e._v(" "),s("div",{staticClass:"login__item"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],attrs:{type:"text",placeholder:"用户名"},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"login__item"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],attrs:{type:"password",placeholder:"密码"},domProps:{value:e.password},on:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key))return null;e.login(t)},input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"login__item"},[s("button",{on:{click:e.login}},[e._v("登录")])])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"login__header"},[s("h1",{staticClass:"login__title"},[e._v("博客后台登录")])])}],r={render:n,staticRenderFns:a};t.a=r},nirG:function(e,t){},oKkF:function(e,t,s){"use strict";var n=s("mLi+");s.n(n);t.a={name:"login",data:function(){return{username:"",password:""}},methods:{login:function(){var e=this,t={username:this.username,password:this.password};this.$store.dispatch("createToken",t).then(function(t){t.data.success&&(e.$message({message:"登陆成功",type:"success"}),e.$router.push("/admin"))}).catch(function(t){e.$message.error(t.response.data.error)})}}}}});