(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-68f6e311"],{"0f5e":function(t,e,o){"use strict";o("67da")},"64c4":function(t,e,o){},"67da":function(t,e,o){},"9ed6":function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"login-container"},[o("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{"status-icon":"",model:t.loginForm,rules:t.loginRules}},[o("div",{staticClass:"title-container"},[o("h3",{staticClass:"title"},[t._v("微店后台管理系统")])]),o("el-form-item",{attrs:{prop:"name"}},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"account"}})],1),o("el-input",{ref:"name",attrs:{placeholder:"用户名",name:"name",type:"text",tabindex:"1",autocomplete:"on"},model:{value:t.loginForm.name,callback:function(e){t.$set(t.loginForm,"name",e)},expression:"loginForm.name"}})],1),o("el-tooltip",{attrs:{content:"键盘大写锁定已打开",placement:"right",manual:""},model:{value:t.capsTooltip,callback:function(e){t.capsTooltip=e},expression:"capsTooltip"}},[o("el-form-item",{attrs:{prop:"password"}},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"password"}})],1),o("el-input",{key:t.passwordType,ref:"password",attrs:{type:t.passwordType,placeholder:"密码",name:"password",tabindex:"2",autocomplete:"on"},on:{blur:function(e){t.capsTooltip=!1}},nativeOn:{keyup:[function(e){return t.checkCapslock(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin(e)}]},model:{value:t.loginForm.password,callback:function(e){t.$set(t.loginForm,"password",e)},expression:"loginForm.password"}}),o("span",{staticClass:"show-pwd",on:{click:t.showPwd}},[o("svg-icon",{attrs:{"icon-class":"password"===t.passwordType?"eye":"eye-open"}})],1)],1)],1),o("el-button",{staticStyle:{width:"100%","margin-bottom":"30px"},attrs:{loading:t.loading,type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.handleLogin(e)}}},[t._v("登录")])],1),o("div",{staticClass:"beian"},[t._v("豫ICP备19034874号-1")])],1)},s=[],a=(o("13d5"),o("d3b7"),o("b64b"),{name:"Login",data:function(){return{loginForm:{name:"",password:""},loginRules:{name:[{required:!0,trigger:"change",validator:function(t,e,o){return e.length>1?o():o(new Error("用户名不能小于2位"))}}],password:[{required:!0,trigger:"change",validator:function(t,e,o){return e.length>5?o():o(new Error("密码不能小于6位"))}}]},passwordType:"password",capsTooltip:!1,loading:!1,redirect:void 0,otherQuery:{}}},watch:{$route:{handler:function(t){var e=t.query;e&&(this.redirect=e.redirect,this.otherQuery=Object.keys(e).reduce((function(t,o){return"redirect"!==o&&(t[o]=e[o]),t}),{}))},immediate:!0}},mounted:function(){},methods:{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;this.$refs.loginForm.validate((function(e){if(!e)return!1;t.loading=!0,t.$store.dispatch("user/login",t.loginForm).then((function(e){t.$router.push({path:t.redirect||"/order/index",query:t.otherQuery}),t.loading=!1})).catch((function(){t.loading=!1}))}))}}}),i=a,r=(o("0f5e"),o("d336"),o("2877")),c=Object(r["a"])(i,n,s,!1,null,"e8bf8e5a",null);e["default"]=c.exports},d336:function(t,e,o){"use strict";o("64c4")}}]);