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