(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0b3ada66"],{"6e57":function(e,t,a){"use strict";a("e413")},"74f9":function(e,t,a){},"80c1":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("common-layout",[a("div",{staticClass:"top"},[a("div",{staticClass:"header"},[a("span",{staticClass:"title"},[e._v(e._s(e.systemName))])])]),a("div",{staticClass:"login"},[a("a-form",{attrs:{form:e.form},on:{submit:e.onSubmit}},[a("a-tabs",{staticStyle:{padding:"0 2px"},attrs:{size:"large",tabBarStyle:{textAlign:"center"}}},[a("a-tab-pane",{key:"1",attrs:{tab:""}},[e.error?a("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{type:"error",closable:!0,message:e.error,showIcon:""},on:{close:e.onClose}}):e._e(),a("a-form-item",[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入账户名",whitespace:!0}]}],expression:"['name', {rules: [{ required: true, message: '请输入账户名', whitespace: true}]}]"}],attrs:{autocomplete:"autocomplete",size:"large",placeholder:"admin"}},[a("a-icon",{attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),a("a-form-item",[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"请输入密码",whitespace:!0}]}],expression:"['password', {rules: [{ required: true, message: '请输入密码', whitespace: true}]}]"}],attrs:{size:"large",placeholder:"888888",autocomplete:"autocomplete",type:"password"}},[a("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1)],1)],1),a("a-form-item",[a("a-button",{staticStyle:{width:"100%","margin-top":"24px"},attrs:{loading:e.logging,size:"large",htmlType:"submit",type:"primary"}},[e._v("登录")])],1)],1)],1)])},r=[],o=a("5530"),i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"common-layout"},[a("div",{staticClass:"content"},[e._t("default")],2),a("page-footer",{attrs:{"link-list":e.footerLinks,copyright:e.copyright}})],1)},n=[],c=a("613e"),l=a("5880"),u={name:"CommonLayout",components:{PageFooter:c["a"]},computed:Object(o["a"])({},Object(l["mapState"])("setting",["footerLinks","copyright"]))},m=u,p=(a("6e57"),a("2877")),d=Object(p["a"])(m,i,n,!1,null,"63c094a6",null),f=d.exports,g=a("93d6"),h=a("b775"),b={name:"Login",components:{CommonLayout:f},data:function(){return{logging:!1,error:"",form:this.$form.createForm(this)}},computed:{systemName:function(){return this.$store.state.setting.systemName}},methods:Object(o["a"])(Object(o["a"])({},Object(l["mapMutations"])("account",["setUser","setPermissions","setRoles"])),{},{onSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e){if(!e){t.logging=!0;var a=t.form.getFieldValue("name"),s=t.form.getFieldValue("password");Object(g["b"])(a,s).then(t.afterLogin)}}))},afterLogin:function(e){console.info("res",e),this.logging=!1;var t=e.data;if(t.isSuccess){var a=t.data.user;this.setUser(a),Object(h["f"])({token:t.tnToken.tokenStr,expireAt:""}),this.$router.push("/demo")}else this.error=t.errMsg},onClose:function(){this.error=!1}})},v=b,y=(a("b7e8"),Object(p["a"])(v,s,r,!1,null,"36b7b008",null)),w=y.exports;t["default"]=w},b7e8:function(e,t,a){"use strict";a("74f9")},e413:function(e,t,a){}}]);