mirror of
https://github.com/mindskip/xzs-mysql.git
synced 2026-08-28 11:07:50 +08:00
1 line
3.9 KiB
JavaScript
1 line
3.9 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-28d6a06f"],{"07e8":function(t,e,o){"use strict";o("ee34")},"25a5":function(t,e,o){"use strict";o("a1ca")},"5fbe":function(t,e,o){t.exports=o.p+"static/img/logo2.745fd978.png"},"9ed6":function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"lowin lowin-blue"},[t._m(0),e("div",{staticClass:"lowin-wrapper"},[e("div",{staticClass:"lowin-box lowin-login"},[e("div",{staticClass:"lowin-box-inner"},[e("el-form",{ref:"loginForm",attrs:{model:t.loginForm,rules:t.loginRules}},[e("p",[t._v("学之思开源考试系统")]),e("div",{staticClass:"lowin-group"},[e("label",[t._v("用户名 ")]),e("el-input",{ref:"userName",staticClass:"lowin-input",attrs:{placeholder:"用户名",name:"userName",type:"text",tabindex:"1","auto-complete":"on"},model:{value:t.loginForm.userName,callback:function(e){t.$set(t.loginForm,"userName",e)},expression:"loginForm.userName"}})],1),e("div",{staticClass:"lowin-group password-group"},[e("label",[t._v("密码 "),e("a",{staticClass:"forgot-link",attrs:{href:"#"}},[t._v("忘记密码?")])]),e("el-input",{key:t.passwordType,ref:"password",staticClass:"lowin-input",attrs:{type:t.passwordType,placeholder:"密码",name:"password",tabindex:"2","auto-complete":"on"},on:{blur:function(e){t.capsTooltip=!1}},nativeOn:{keyup:[function(e){return t.checkCapslock.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin.apply(null,arguments)}]},model:{value:t.loginForm.password,callback:function(e){t.$set(t.loginForm,"password",e)},expression:"loginForm.password"}})],1),e("el-button",{staticClass:"lowin-btn login-btn",attrs:{loading:t.loading,type:"text"},nativeOn:{click:function(e){return e.preventDefault(),t.handleLogin.apply(null,arguments)}}},[t._v("登录")]),e("div",{staticClass:"text-foot"},[t._v(" 还没有账号? "),e("router-link",{staticClass:"register-link",attrs:{to:"/register"}},[t._v(" 注册 ")])],1)],1)],1)])]),t._m(1)])},n=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"lowin-brand"},[e("img",{staticStyle:{"margin-top":"12px"},attrs:{src:o("5fbe"),alt:"logo"}})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-foot-copyright"},[e("span",[t._v("Copyright ©2019-2026 武汉思维跳跃科技有限公司 版权所有")])])}],i=o("5530"),a=(o("d9e2"),o("14d9"),o("2f62")),r=o("7ded"),l={name:"Login",data:function(){var t=function(t,e,o){e.length<5?o(new Error("用户名不能少于5个字符")):o()},e=function(t,e,o){e.length<5?o(new Error("密码不能少于5个字符")):o()};return{loginForm:{userName:"",password:"",remember:!1},loginRules:{userName:[{required:!0,trigger:"blur",validator:t}],password:[{required:!0,trigger:"blur",validator:e}]},passwordType:"password",capsTooltip:!1,loading:!1,showDialog:!1}},created:function(){},mounted:function(){""===this.loginForm.userName?this.$refs.userName.focus():""===this.loginForm.password&&this.$refs.password.focus()},destroyed:function(){},methods:Object(i["a"])({checkCapslock:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.shiftKey,o=t.key;o&&1===o.length&&(this.capsTooltip=!!(e&&o>="a"&&o<="z"||!e&&o>="A"&&o<="Z")),"CapsLock"===o&&!0===this.capsTooltip&&(this.capsTooltip=!1)},showPwd:function(){var t=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){t.$refs.password.focus()}))},handleLogin:function(){var t=this,e=this;this.$refs.loginForm.validate((function(o){if(!o)return!1;t.loading=!0,r["a"].login(t.loginForm).then((function(t){t&&1===t.code?(e.setUserName(e.loginForm.userName),e.$router.push({path:"/"})):(e.loading=!1,e.$message.error(t.message))})).catch((function(t){e.loading=!1}))}))}},Object(a["d"])("user",["setUserName"]))},c=l,u=(o("25a5"),o("07e8"),o("2877")),p=Object(u["a"])(c,s,n,!1,null,"3e649d5a",null);e["default"]=p.exports},a1ca:function(t,e,o){},ee34:function(t,e,o){}}]); |