(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41119737"],{"1ffc":function(e,t,s){e.exports={color_0:"#000",color_3:"#333",color_6:"#666",color_9:"#999",color_b:"#bbb",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#FD5A57",pad:"120px"}},"336c":function(e,t,s){"use strict";var o=s("1ffc"),a=s.n(o);a.a},"74c1":function(e,t,s){"use strict";var o=s("792a"),a=s.n(o);a.a},"792a":function(e,t,s){},"9ed6":function(e,t,s){"use strict";s.r(t);var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"login"},[s("div",{staticClass:"container"},[s("div",{staticClass:"content"},[e._m(0),e._v(" "),s("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,"auto-complete":"on","label-position":"left"}},[s("h3",{staticClass:"title"},[e._v("账户登录")]),e._v(" "),s("el-form-item",{attrs:{prop:"username"}},[s("el-input",{ref:"username",attrs:{type:"text",size:"small",name:"username",placeholder:"邮箱/用户名","auto-complete":"on"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),e._v(" "),s("el-form-item",{attrs:{prop:"password"}},[s("el-input",{ref:"password",attrs:{type:e.passwordType,size:"small",name:"password",minlength:"6",maxlength:"8",placeholder:"请输入密码","auto-complete":"on"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.Login(t)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}},[s("svg-icon",{attrs:{slot:"suffix","icon-class":"password"===e.passwordType?"eye":"eye-open"},on:{click:e.showPwd},slot:"suffix"})],1)],1),e._v(" "),s("el-button",{staticClass:"login-btn",attrs:{type:"danger",size:"small",loading:e.loading},nativeOn:{click:function(t){return t.preventDefault(),e.Login(t)}}},[e._v("登录")]),e._v(" "),s("div",{staticClass:"link"},[s("router-link",{staticClass:"link-item",attrs:{to:"/forget/index"}},[e._v("忘记密码")]),e._v(" "),s("router-link",{staticClass:"link-item",attrs:{to:"/register/index"}},[e._v("免费注册")])],1)],1)],1)])])},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"text"},[s("div",{staticClass:"back"},[s("p",[e._v("前沿动力")]),e._v(" "),s("p",[e._v("引领创新")])]),e._v(" "),s("div",{staticClass:"face"},[s("p",[e._v("前沿动力")]),e._v(" "),s("p",[e._v("引领创新")])])])}],r=(s("a481"),s("b775")),n=s("cc33"),i=(s("61f7"),{name:"Login",data:function(){return{loginForm:{username:"",password:""},loginRules:{username:[{required:!0,message:"请输入邮箱/用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:8,message:"密码长度为6到8位",trigger:"blur"}]},loading:!1,passwordType:"password",redirect:void 0}},created:function(){},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},methods:{showPwd:function(){var e=this;this.passwordType="password"==this.passwordType?"text":"password",this.$nextTick((function(){e.$refs.password.focus()}))},Login:function(){var e=this;this.$refs.loginForm.validate((function(t){if(!t)return!1;e.loading=!0;var s={transCode:"A00002",userName:e.loginForm.username,authCode:"",password:Object(r["a"])(e.loginForm.password),type:""};Object(r["c"])(s).then((function(t){e.$store.dispatch("user/changeState",{key:"token",value:t.clientToken}),e.$store.dispatch("user/changeState",{key:"name",value:t.nickName}),e.$store.dispatch("user/changeState",{key:"userId",value:t.userId}),e.$store.dispatch("user/changeState",{key:"userType",value:t.userType}),e.$store.dispatch("user/changeState",{key:"realStatus",value:t.authenticationState}),e.$store.dispatch("user/changeState",{key:"loginStatus",value:!0}),e.$message.success("登录成功!"),e.loading=!1,Object(n["b"])(t.clientToken),setTimeout((function(){e.$router.replace({path:e.$route.query.redirect||"/index"})}),1e3)})).catch((function(t){e.loading=!1}))}))}}}),c=i,l=(s("74c1"),s("336c"),s("2877")),u=Object(l["a"])(c,o,a,!1,null,"6a56bce6",null);t["default"]=u.exports}}]);