"use strict";(self["webpackChunkstudent_information_sys"]=self["webpackChunkstudent_information_sys"]||[]).push([[376],{8376:function(e,s,t){t.r(s),t.d(s,{default:function(){return d}});var r=function(){var e=this,s=e._self._c;return s("div",[s("div",{staticClass:"login-card"},[s("el-form",{ref:"form",attrs:{model:e.loginform,"label-width":"80px"}},[s("el-form-item",{attrs:{label:"用户名"}},[s("el-input",{model:{value:e.loginform.username,callback:function(s){e.$set(e.loginform,"username",s)},expression:"loginform.username"}})],1),s("el-form-item",{attrs:{label:"密码"}},[s("el-input",{attrs:{type:"password"},model:{value:e.loginform.password,callback:function(s){e.$set(e.loginform,"password",s)},expression:"loginform.password"}})],1),s("el-form-item",[s("el-button",{attrs:{type:"primary"},on:{click:e.login}},[e._v("登录")])],1)],1)],1)])},o=[],a=(t(6206),t(1728)),l=t.n(a),n={data(){return{loginform:{username:"",password:""}}},methods:{login(){l().ajax({url:this.$apiUrl+"/userAction/login",method:"POST",data:this.loginform,success:e=>{e.success?(localStorage.setItem("user",e.data),l().ajaxSetup({headers:{token:e.data}}),this.$route.query.redirect?this.$router.push({name:this.$route.query.redirect}):this.$router.push("student")):this.$message({type:"error",message:"登录失败，"+e.msg,showClose:!0})},error:e=>{this.$message({type:"error",message:"登录失败，code="+e.status,showClose:!0})}})}},mounted(){}},i=n,u=t(8126),m=(0,u.A)(i,r,o,!1,null,null,null),d=m.exports}}]);
//# sourceMappingURL=376.23b9bc94.js.map