1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21cddd39"],{"0323":function(s,e,t){},2602:function(s,e,t){"use strict";t("0323")},4973:function(s,e,t){"use strict";t("8f82")},"8f82":function(s,e,t){},"9ed6":function(s,e,t){"use strict";t.r(e);var o=function(){var s=this,e=s.$createElement,t=s._self._c||e;return t("div",{staticClass:"login-container"},[s._m(0),s._v(" "),t("div",{staticClass:"login-section"},[t("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:s.loginForm,rules:s.loginRules,"auto-complete":"on","label-position":"left"}},[t("div",{staticClass:"title-container"},[s._v("登录")]),s._v(" "),t("el-form-item",{staticClass:"logitem",attrs:{prop:"username"}},[t("span",{staticClass:"svg-container"},[t("svg-icon",{attrs:{"icon-class":"user"}})],1),s._v(" "),t("el-input",{ref:"username",staticClass:"login-input",attrs:{placeholder:"请输入用户名",name:"username",type:"text",tabindex:"1","auto-complete":"off"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&s._k(e.keyCode,"enter",13,e.key,"Enter")?null:s.handleLogin(e)}},model:{value:s.loginForm.username,callback:function(e){s.$set(s.loginForm,"username","string"===typeof e?e.trim():e)},expression:"loginForm.username"}})],1),s._v(" "),t("el-form-item",{staticClass:"logitem",attrs:{prop:"password"}},[t("span",{staticClass:"svg-container"},[t("svg-icon",{attrs:{"icon-class":"password"}})],1),s._v(" "),t("el-input",{key:s.passwordType,ref:"password",staticClass:"login-input",attrs:{type:s.passwordType,placeholder:"请输入密码",name:"password",tabindex:"2","auto-complete":"off"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&s._k(e.keyCode,"enter",13,e.key,"Enter")?null:s.handleLogin(e)}},model:{value:s.loginForm.password,callback:function(e){s.$set(s.loginForm,"password","string"===typeof e?e.trim():e)},expression:"loginForm.password"}}),s._v(" "),t("span",{staticClass:"show-pwd",on:{click:s.showPwd}},[t("svg-icon",{attrs:{"icon-class":"password"===s.passwordType?"eye":"eye-open"}})],1)],1),s._v(" "),t("div",{staticClass:"remberBox",on:{click:function(e){s.isSaveUserInfo=!s.isSaveUserInfo}}},[t("div",{staticClass:"dotWrap",class:[s.isSaveUserInfo?"checked":""]}),s._v("\n 记住密码\n ")]),s._v(" "),t("div",{staticClass:"loginBtn",class:s.loginForm.username&&s.loginForm.password?"":"disabled",on:{click:s.handleLogin}},[s._v("登录")])],1)],1)])},n=[function(){var s=this,e=s.$createElement,o=s._self._c||e;return o("div",{staticClass:"login-left"},[o("div",{staticClass:"login-header"},[o("div",{staticClass:"logo"},[o("img",{attrs:{src:t("d209"),alt:""}})]),s._v(" "),o("i",{staticClass:"line"}),s._v(" "),o("div",{staticClass:"logo-name"},[s._v("乐团管理系统")])]),s._v(" "),o("div",{staticClass:"footer"},[s._v("\n Copyright © 2022 管乐迷, Inc.ALL Rights Reserved\n ")])])}],i=(t("61f7"),t("ce96")),a={name:"Login",data:function(){var s=function(s,e,t){e?t():t(new Error("请输入用户名"))},e=function(s,e,t){e.length<6?t(new Error("密码必须大于六位")):t()};return{loginForm:{username:"",password:""},loginRules:{username:[{required:!0,trigger:"blur",validator:s}],password:[{required:!0,trigger:"blur",validator:e}]},passwordType:"password",redirect:void 0,isSaveUserInfo:!0}},mounted:function(){this.loginForm.username=localStorage.getItem("username"),this.loginForm.password=localStorage.getItem("password")},watch:{$route:{handler:function(s){this.redirect=s.query&&s.query.redirect},immediate:!0}},methods:{showPwd:function(){var s=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){s.$refs.password.focus()}))},handleLogin:function(){var s=this,e=new i["a"];e.removeAll(),this.isSaveUserInfo?(localStorage.setItem("username",this.loginForm.username),localStorage.setItem("password",this.loginForm.password)):(localStorage.setItem("username",""),localStorage.setItem("password","")),this.$refs.loginForm.validate((function(e){if(!e)return!1;s.$store.dispatch("user/login",s.loginForm).then((function(){s.$nextTick((function(e){s.$store.dispatch("delAllViews"),s.$router.push({path:"/workbench"})}))})).catch((function(){}))}))},saveUserInfo:function(){this.isSaveUserInfo=!this.isSaveUserInfo}}},r=a,l=(t("2602"),t("4973"),t("2877")),c=Object(l["a"])(r,o,n,!1,null,"51b74e3a",null);e["default"]=c.exports},d209:function(s,e,t){s.exports=t.p+"static/img/login-logo.fa433576.png"}}]);
|