(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-eaed1b24"],{"80c1":function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"login",style:[t.computedBgImage]},[e("div",{staticClass:"login-wrap"},[e("div",{staticClass:"login-wrap-header"},[e("div",[e("img",{staticClass:"logo",attrs:{alt:"logo",src:s("4ffd")}}),e("span",{staticClass:"title"},[t._v(t._s(t.systemName))])]),e("div",{staticClass:"login-wrap-desc"},[t._v("Ant Design 西湖区最具影响力的 Web 设计规范")])]),e("a-form-model",{ref:"ruleForm",attrs:{model:t.form,rules:t.rules}},[e("a-form-model-item",{ref:"account",attrs:{prop:"account",placeholder:"账号"}},[e("a-input",{model:{value:t.form.account,callback:function(e){t.$set(t.form,"account",e)},expression:"form.account"}},[e("a-icon",{attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),e("a-form-model-item",{ref:"password",attrs:{prop:"password"}},[e("a-input-password",{attrs:{placeholder:"密码"},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-model-item",[e("a-button",{staticStyle:{width:"100%"},attrs:{loading:t.logging,size:"large",htmlType:"submit",type:"primary"},on:{click:t.onSubmit}},[t._v(" 登录 ")])],1)],1)],1)])},o=[],r=s("5530"),i=(s("14d9"),s("93d6")),n=s("b775"),c=s("89a5"),u=s("2f62"),l={name:"Login",data:function(){return{logging:!1,error:"",form:{account:"",password:""},rules:{account:[{required:!0,message:"账号不能为空",trigger:"blur"}],password:[{required:!0,message:"密码不能为空",trigger:"blur"}]}}},computed:{systemName:function(){return this.$store.state.setting.systemName},computedBgImage:function(){var t={"background-image":"url('https://img6.bdstatic.com/img/image/pcindex/sunjunpchuazhoutu.JPG')"};return t}},methods:Object(r["a"])(Object(r["a"])({},Object(u["c"])("account",["setUser","setPermissions","setRoles"])),{},{onSubmit:function(){var t=this;this.$refs.ruleForm.validate((function(e){e&&(t.logging=!0,t.$router.push("/account"))}))},afterLogin:function(t){var e=this;this.logging=!1;var s=t.data;if(s.code>=0){var a=s.data,o=a.user,r=a.permissions,u=a.roles;this.setUser(o),this.setPermissions(r),this.setRoles(u),Object(n["f"])({token:s.data.token,expireAt:new Date(s.data.expireAt)}),Object(i["a"])().then((function(t){var a=t.data.data;Object(c["d"])(a),e.$router.push("/demo"),e.$message.success(s.message,3)}))}else this.error=s.message},onClose:function(){this.error=!1}})},m=l,d=(s("bf94"),s("2877")),p=Object(d["a"])(m,a,o,!1,null,"c0ed99bc",null),f=p.exports;e["default"]=f},a6d9:function(t,e,s){},bf94:function(t,e,s){"use strict";s("a6d9")}}]);