(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7374bac2"],{"19fb":function(t,e,o){},7101:function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t._self._c;return e("a-layout",{staticStyle:{position:"fixed",height:"100%",width:"100%"},attrs:{id:"components-layout-demo-top-side"}},[e("a-layout-header",{style:{background:"#fff",padding:0,height:"112px"}},[e("div",{staticClass:"header-box"},[e("img",{staticClass:"logoImg",attrs:{src:o("2533"),alt:""}}),e("span")])]),e("a-layout-content",{staticClass:"content-box"},[e("div",{staticClass:"desc-box"},[e("p",{staticStyle:{"font-size":"22px"}})]),e("div",{staticClass:"login-box"},[e("p",{staticClass:"login-title"},[t._v("用户登录")]),e("a-form",{staticStyle:{width:"240px"},attrs:{form:t.form},on:{submit:t.login}},[e("a-form-item",[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["userNameOrEmailAddress",{rules:[{required:!0,message:"请输入用户名!"}]}],expression:"[\n                        'userNameOrEmailAddress',\n                        {rules: [{ required: true, message: '请输入用户名!' }]}\n                      ]"}],staticStyle:{height:"35px","margin-top":"8px","padding-bottom":"8px","box-sizing":"border-box"},attrs:{placeholder:"用户名"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)","margin-top":"-2px"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),e("a-form-item",[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"请输入密码!"}]}],expression:"[\n                        'password',\n                        {rules: [{ required: true, message: '请输入密码!' }]}\n                        ]"}],staticStyle:{height:"35px","margin-top":"8px","padding-bottom":"8px","box-sizing":"border-box"},attrs:{type:"password",placeholder:"登录密码"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)","margin-top":"-2px"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",[e("a-button",{staticStyle:{width:"100%","margin-top":"25px",height:"35px"},attrs:{type:"primary","html-type":"submit",loading:t.loading}},[t._v(" 登录 ")])],1)],1)],1)]),e("a-layout-footer",{staticStyle:{"text-align":"center",height:"112px"}},[e("p",{staticClass:"foot-text"},[t._v("© 2020 依格良特（重庆）科技发展有限公司")])])],1)},a=[],i=(o("14d9"),o("4ec3")),r=o("b893"),n={name:"login",data(){return{form:this.$form.createForm(this),loading:!1}},mounted(){this.$storage.remove("testBox"),localStorage.setItem("Token",""),localStorage.setItem("userId",""),localStorage.setItem("userData",""),localStorage.setItem("sourceToken",""),localStorage.setItem("isSource","0"),this.autoLogin()},methods:{login(t){t.preventDefault(),this.form.validateFields((t,e)=>{t||(console.log(e,"values"),this.loading=!0,Object(i["a"])(e).then(t=>{this.initBox(),console.log(t,"res666666666666"),localStorage.setItem("Token",t.accessToken),localStorage.setItem("userId",t.userId),this.$router.push({name:"qusetionBankManage"}),this.loading=!1}).catch(t=>{this.loading=!1}))})},initBox(){let t=this.$storage.get("testBox");console.log(t,"testBox6666666666666"),t&&null!=t?this.$store.commit("setTestBox",t):this.$storage.set("testBox",[])},autoLogin(){const t=Object(r["f"])("token");t&&(this.loading=!0,Object(i["b"])({Token:t}).then(e=>{localStorage.setItem("sourceToken",t),localStorage.setItem("Token",e.accessToken),localStorage.setItem("userId",e.userId),this.$router.push({name:"qusetionBankManage"}),this.loading=!1}).catch(t=>{this.loading=!1}))}}},l=n,c=(o("ef1c"),o("2877")),d=Object(c["a"])(l,s,a,!1,null,"7ac5de77",null);e["default"]=d.exports},ef1c:function(t,e,o){"use strict";o("19fb")}}]);
//# sourceMappingURL=chunk-7374bac2.5e41c8d4.js.map