| | |
| | | <template> |
| | | <div class="login-container"> |
| | | <el-alert |
| | | title="beautiful boys and girls欢迎加入vue-admin-beautifulQQ群:972435319" |
| | | type="success" |
| | | :closable="false" |
| | | style="position: fixed" |
| | | ></el-alert> |
| | | <el-row> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="16" :xl="16"> |
| | | <div style="color: transparent">占位符</div> |
| | |
| | | class="login-form" |
| | | label-position="left" |
| | | > |
| | | <div class="title">hello !</div> |
| | | <div class="title-tips">欢迎来到{{ title }}!</div> |
| | | <div class="title-tips">欢迎使用{{ title }}!</div> |
| | | <el-form-item style="margin-top: 40px" prop="username"> |
| | | <span class="svg-container svg-container-admin"> |
| | | <vab-icon :icon="['fas', 'user']" /> |
| | |
| | | > |
| | | 登录 |
| | | </el-button> |
| | | <router-link to="/register"> |
| | | <div style="margin-top: 20px">注册</div> |
| | | </router-link> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | }; |
| | | const validatePassword = (rule, value, callback) => { |
| | | if (!isPassword(value)) { |
| | | callback(new Error("密码不能少于6位")); |
| | | callback(new Error("密码不能少于5位")); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | beforeDestroy() { |
| | | document.body.style.overflow = "auto"; |
| | | }, |
| | | mounted() { |
| | | this.form.username = "admin"; |
| | | this.form.password = "123456"; |
| | | setTimeout(() => { |
| | | this.handleLogin(); |
| | | }, 3000); |
| | | }, |
| | | methods: { |
| | | handlePassword() { |
| | | this.passwordType === "password" |
| | |
| | | ? "/" |
| | | : this.redirect; |
| | | this.$router.push(routerPath).catch(() => {}); |
| | | this.loading = false; |
| | | this.loading = true; |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |