System.register(["./index-legacy.a084919e.js"],(function(t,o){"use strict";var a,e,r,i=document.createElement("style");return i.textContent=".login[data-v-f2bdfe4d]{background:var(--color-white);padding:160px 0 161px}.login .login-content[data-v-f2bdfe4d]{width:978px;color:var(--color-gray);text-align:center;margin:0 auto}.login .content[data-v-f2bdfe4d]{width:490px;margin:0 auto}.logo[data-v-f2bdfe4d]{position:relative;width:169px;height:169px;margin:0 auto}.logo .logo-img[data-v-f2bdfe4d]{position:absolute;top:50%;left:50%;width:42px;height:42px;transform:translate(-50%,-50%)}.logo .logo-loop-img[data-v-f2bdfe4d]{width:169px;height:169px;animation:rotate 6s linear infinite}.tip[data-v-f2bdfe4d]{font-size:18px}.tip img[data-v-f2bdfe4d]{width:162px;height:30px;margin:122px 0 22px}.form[data-v-f2bdfe4d]{width:330px;margin:50px auto}.form .password[data-v-f2bdfe4d]{margin:10px 0 12px}.form .button[data-v-f2bdfe4d]{margin-top:30px}.button .el-button[data-v-f2bdfe4d]{width:80px;height:30px;line-height:30px}.error[data-v-f2bdfe4d]{margin-bottom:42px}.footer[data-v-f2bdfe4d]{color:var(--color-gray-bold);font-size:13px;border-top:1px solid var(--color-gray);margin-top:50px;padding-top:20px;text-align:center}.mr7[data-v-f2bdfe4d]{margin-right:7px}.ml7[data-v-f2bdfe4d]{margin-left:7px}.footer li[data-v-f2bdfe4d]:nth-child(1){margin-bottom:12px}.el-form-item.memory .el-checkbox[data-v-f2bdfe4d]{justify-content:center}\n",document.head.appendChild(i),{setters:[function(t){a=t.n,e=t.t,r=t.u}],execute:function(){var i=""+new URL("logo-loop.68eb387d.png",o.meta.url).href;t("default",a({name:"login",data:function(){return{errors:"",memory:!1,form:{data:{account:"",password:""},rules:{account:[{required:!0,trigger:"blur"}],password:[{required:!0,trigger:"blur"}]}}}},mounted:function(){var t=localStorage.getItem("conf_account"),o=localStorage.getItem("conf_password");t&&o&&(this.memory=!0,this.form.data.account=t,this.form.data.password=o)},methods:{doLogin:function(){var t=this,o=this.form.data,a=o.account,e=o.password,r=this.$t("common.failure");this.$refs.form.validate((function(o){o&&t.$axios.post("/api/auth/login",{account:a,password:e}).then((function(o){var i=o.data,s=i.code,n=i.msg,l=void 0===n?r:n,d=i.data;if(0==s){var c=d.token;sessionStorage.setItem("conf_token",c),t.memory?(localStorage.setItem("conf_account",a),localStorage.setItem("conf_password",e)):(localStorage.removeItem("conf_account"),localStorage.removeItem("conf_password")),t.$store.dispatch("syncUserinfo"),t.$router.push({path:"/"})}else t.errors=l})).catch((function(){t.errors=r}))}))}}},(function(){var t=this,o=t._self._c;return o("div",{staticClass:"login"},[o("div",{staticClass:"login-content"},[o("div",{staticClass:"content"},[t._m(0),o("div",{staticClass:"tip"},[o("img",{attrs:{src:e,alt:"logo"}}),o("br"),t._v(" "+t._s(t.$t("login.index.loginTip"))+" ")]),o("div",{staticClass:"form"},[o("el-form",{ref:"form",attrs:{model:t.form.data,rules:t.form.rules}},[o("el-form-item",{staticClass:"account",attrs:{prop:"account"}},[o("el-input",{attrs:{placeholder:"Huabook ID",clearable:""},model:{value:t.form.data.account,callback:function(o){t.$set(t.form.data,"account",o)},expression:"form.data.account"}})],1),o("el-form-item",{staticClass:"password",attrs:{prop:"password"}},[o("el-input",{attrs:{type:"password",placeholder:"Password",clearable:""},model:{value:t.form.data.password,callback:function(o){t.$set(t.form.data,"password",o)},expression:"form.data.password"}})],1),t.errors?o("el-form-item",{staticClass:"error"},[o("span",{staticClass:"error-tip"},[t._v(t._s(t.errors))])]):t._e(),o("el-form-item",{staticClass:"memory"},[o("el-checkbox",{model:{value:t.memory,callback:function(o){t.memory=o},expression:"memory"}},[t._v(t._s(t.$t("login.index.form.memory")))])],1),o("el-form-item",{staticClass:"button"},[o("el-button",{attrs:{type:"primary",round:""},on:{click:t.doLogin}},[t._v(t._s(t.$t("login.common.button.login")))])],1)],1)],1),o("div",{staticClass:"footer"},[o("ul",[o("li",[o("router-link",{staticClass:"mr7",attrs:{to:"/findPwd"}},[t._v(" "+t._s(t.$t("login.index.footer.text1"))+" "+t._s(t.$t("login.index.footer.text2"))+" ")])],1),o("li",[t._v(" "+t._s(t.$t("login.index.footer.text3"))+" "),o("router-link",{staticClass:"ml7",attrs:{to:"/register"}},[t._v(t._s(t.$t("login.index.footer.text4")))])],1)])])])])])}),[function(){var t=this._self._c;return t("div",{staticClass:"logo"},[t("img",{staticClass:"logo-img",attrs:{src:r,alt:"logo"}}),t("img",{staticClass:"logo-loop-img",attrs:{src:i,alt:"logo loop"}})])}],!1,null,"f2bdfe4d",null,null).exports)}}}));
