(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["login"],{a55b:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page-login"},[a("div",[a("el-card",{staticClass:"card-view",attrs:{"body-style":{padding:"0px"}}},[a("div",{attrs:{slot:"header"},slot:"header"},[a("span",[e._v("请先登录")])]),a("el-form",{ref:"form",staticClass:"card-body",attrs:{"label-width":"80px"}},[a("el-form-item",{attrs:{label:"用户名"}},[a("el-input",{model:{value:e.model.username,callback:function(t){e.$set(e.model,"username",t)},expression:"model.username"}})],1),a("el-form-item",{attrs:{label:"密码"}},[a("el-input",{attrs:{type:"password"},model:{value:e.model.password,callback:function(t){e.$set(e.model,"password",t)},expression:"model.password"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.login}},[e._v("登录")])],1)],1)],1)],1)])},r=[],n=(a("96cf"),a("1da1")),o={data:function(){return{model:{}}},methods:{login:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.post("/login",e.model);case 2:a=t.sent,localStorage.setItem("token",a.data.token),localStorage.setItem("username",a.data.username),e.$message({type:"success",message:"登录成功"}),e.$router.push("/");case 7:case"end":return t.stop()}}),t)})))()}}},l=o,c=(a("dc64"),a("2877")),i=Object(c["a"])(l,s,r,!1,null,"55c887b9",null);t["default"]=i.exports},dc64:function(e,t,a){"use strict";var s=a("e641"),r=a.n(s);r.a},e641:function(e,t,a){}}]);
//# sourceMappingURL=login.08439546.js.map