zhangzengfei
2021-11-17 5186227a467bd34dc253e64b23bc96d3a07bb399
src/views/login/index.vue
@@ -1,11 +1,5 @@
<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>
@@ -18,8 +12,7 @@
          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']" />
@@ -64,9 +57,6 @@
          >
            登录
          </el-button>
          <router-link to="/register">
            <div style="margin-top: 20px">注册</div>
          </router-link>
        </el-form>
      </el-col>
    </el-row>
@@ -95,7 +85,7 @@
    };
    const validatePassword = (rule, value, callback) => {
      if (!isPassword(value)) {
        callback(new Error("密码不能少于6位"));
        callback(new Error("密码不能少于5位"));
      } else {
        callback();
      }
@@ -142,13 +132,6 @@
  beforeDestroy() {
    document.body.style.overflow = "auto";
  },
  mounted() {
    this.form.username = "admin";
    this.form.password = "123456";
    setTimeout(() => {
      this.handleLogin();
    }, 3000);
  },
  methods: {
    handlePassword() {
      this.passwordType === "password"
@@ -170,7 +153,7 @@
                  ? "/"
                  : this.redirect;
              this.$router.push(routerPath).catch(() => {});
              this.loading = false;
              this.loading = true;
            })
            .catch(() => {
              this.loading = false;