index-legacy.52959c2b.js 5.0 KB

1
  1. System.register(["./index-legacy.88892f9c.js"],(function(t,o){"use strict";var a,e,r,i=document.createElement("style");return i.textContent=".login a:hover{text-decoration:underline}.login[data-v-2c432e3c]{background:var(--color-white);padding:160px 0 161px}.login .login-content[data-v-2c432e3c]{width:960px;color:var(--color-gray);text-align:center;margin:0 auto}.login .content[data-v-2c432e3c]{width:490px;margin:0 auto}.logo[data-v-2c432e3c]{position:relative;width:169px;height:169px;margin:0 auto}.logo .logo-img[data-v-2c432e3c]{width:42px;height:42px;cursor:pointer;z-index:1;transform:scale(1.5)}.logo .logo-loop-img[data-v-2c432e3c]{position:absolute;top:0;left:0;width:169px;height:169px;opacity:0}.logo.easein .logo-img[data-v-2c432e3c]{animation:easein1 1s linear;transform:scale(1.1)}.logo.easein .logo-loop-img[data-v-2c432e3c]{animation:easein 1s linear;opacity:1}.logo.easeout .logo-img[data-v-2c432e3c]{animation:easeout1 1s linear;transform:scale(1.5)}.logo.easeout .logo-loop-img[data-v-2c432e3c]{animation:easeout 1s linear;opacity:0}.tip[data-v-2c432e3c]{font-size:18px}.tip img[data-v-2c432e3c]{width:162px;height:30px;margin:122px 0 22px}.form[data-v-2c432e3c]{width:330px;margin:50px auto}.form .password[data-v-2c432e3c]{margin:10px 0 12px}.form .button[data-v-2c432e3c]{margin-top:30px}.button .el-button[data-v-2c432e3c]{width:80px;height:30px;line-height:30px}.error[data-v-2c432e3c]{margin-bottom:42px}.footer[data-v-2c432e3c]{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-2c432e3c]{margin-right:7px}.ml7[data-v-2c432e3c]{margin-left:7px}.footer li[data-v-2c432e3c]:nth-child(1){margin-bottom:12px}.el-form-item.memory .el-checkbox[data-v-2c432e3c]{justify-content:center}\n",document.head.appendChild(i),{setters:[function(t){a=t.n,e=t.x,r=t.y}],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,animation:"",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:{changeAnimation:function(){this.animation=""===this.animation||"easeout"===this.animation?"easein":"easeout"},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,n=i.code,s=i.msg,c=void 0===s?r:s,l=i.data;if(0==n){var m=l.token;sessionStorage.setItem("conf_token",m),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=c})).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"},[o("div",{class:["logo","vh-center",t.animation]},[o("img",{staticClass:"logo-img",attrs:{src:e,alt:"logo"},on:{click:t.changeAnimation}}),o("img",{staticClass:"logo-loop-img",attrs:{src:i,alt:"logo loop"}})]),o("div",{staticClass:"tip"},[o("img",{attrs:{src:r,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:{autocomplete:"off",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:{autocomplete:"new-password",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)])])])])])}),[],!1,null,"2c432e3c",null,null).exports)}}}));