(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-80d4b084"],{"17bf":function(e,n,t){},"778c":function(e,n,t){"use strict";t("92d6")},"92d6":function(e,n,t){},b953:function(e,n,t){"use strict";t.r(n);var s=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"login-container"},[t("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,"auto-complete":"on","label-position":"left"}},[t("div",{staticClass:"title-container"},[t("h3",{staticClass:"title"},[e._v("Login Form")])]),t("el-form-item",{attrs:{prop:"username"}},[t("span",{staticClass:"svg-container"},[t("svg-icon",{attrs:{"icon-class":"user"}})],1),t("el-input",{ref:"username",attrs:{placeholder:"Username",name:"username",type:"text",tabindex:"1","auto-complete":"on"},model:{value:e.loginForm.username,callback:function(n){e.$set(e.loginForm,"username",n)},expression:"loginForm.username"}})],1),t("el-form-item",{attrs:{prop:"password"}},[t("span",{staticClass:"svg-container"},[t("svg-icon",{attrs:{"icon-class":"password"}})],1),t("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"Password",name:"password",tabindex:"2","auto-complete":"on"},nativeOn:{keyup:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.handleLogin(n)}},model:{value:e.loginForm.password,callback:function(n){e.$set(e.loginForm,"password",n)},expression:"loginForm.password"}}),t("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[t("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1),t("div",{staticStyle:{margin:"20px auto"}},[t("el-button",{attrs:{loading:e.loading,type:"primary"},nativeOn:{click:function(n){return n.preventDefault(),e.handleLogin(n)}}},[e._v("Login")]),t("el-button",{attrs:{loading:e.loading,type:"success"},nativeOn:{click:function(n){return n.preventDefault(),e.clearToken(n)}}},[e._v("Clear")])],1),t("div",{staticClass:"tips"},[t("span",{staticStyle:{"margin-right":"20px"}},[e._v("username: admin")]),t("span",[e._v(" password: any")])])],1)],1)},o=[],r=(t("2a39"),t("4360")),a=t("61f7"),i={name:"Register",data:function(){var e=function(e,n,t){Object(a["b"])(n)?t():t(new Error("Please enter the correct user name"))},n=function(e,n,t){n.length<6?t(new Error("The password can not be less than 6 digits")):t()};return{loginForm:{username:"admin",password:"111111"},loginRules:{username:[{required:!0,trigger:"blur",validator:e}],password:[{required:!0,trigger:"blur",validator:n}]},loading:!1,passwordType:"password",redirect:void 0}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},methods:{showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))},handleLogin:function(){var e=this;this.$store.dispatch("user/login",this.loginForm).then((function(){e.$router.push({path:"/login"})})).catch((function(e){console.log(e)})).finally((function(){e.loading=!1}))},clearToken:function(){r["a"].dispatch("user/removeToken").then((function(){location.reload()}))}}},l=i,c=(t("f28e"),t("778c"),t("5d22")),u=Object(c["a"])(l,s,o,!1,null,"25c99d8c",null);n["default"]=u.exports},f28e:function(e,n,t){"use strict";t("17bf")}}]);