"use strict";(self["webpackChunktest"]=self["webpackChunktest"]||[]).push([[702],{9702:function(e,s,t){t.r(s),t.d(s,{default:function(){return d}});var a=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",[t("div",{staticClass:"login"},[t("h1",[e._v("欢迎来到后台管理系统")]),t("div",{staticClass:"inp"},[t("form",{attrs:{action:""}},[e._v(" 用户名: "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.id,expression:"id"}],attrs:{type:"text",placeholder:"请输入账号"},domProps:{value:e.id},on:{input:function(s){s.target.composing||(e.id=s.target.value)}}}),t("br"),t("br"),e._v(" 密  码: "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],attrs:{type:"password",placeholder:"请输入密码",autocomplete:"off"},domProps:{value:e.password},on:{input:function(s){s.target.composing||(e.password=s.target.value)}}}),t("br"),t("br"),t("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("登录")])],1)])])])},o=[],r={name:"Login",data(){return{id:"",password:""}},methods:{async submit(){const e={username:this.id,password:this.password},s=await this.$axios("/api/user/login/","POST",e);console.log(s),0===s.code?(this.$message.success("登录成功"),window.sessionStorage.setItem("token",123),this.$router.push("/LayOut")):this.$message.error("登录失败")}}},i=r,n=t(1001),u=(0,n.Z)(i,a,o,!1,null,"7d183ff8",null),d=u.exports}}]);
//# sourceMappingURL=702.js.map