luohairen
2024-11-25 87e3d52c62233ad44bd7bac3f43e5348a2de4e94
src/views/login.vue
@@ -52,7 +52,10 @@
              type="text"
            >
              <template #prefix>
                <svg-icon class="el-input__icon input-icon" icon-class="user" />
                                <svg-icon
                                    class="el-input__icon input-icon"
                                    icon-class="user"
                                />
              </template>
            </el-input>
          </el-form-item>
@@ -92,7 +95,11 @@
              </template>
            </el-input>
            <div class="login-code">
              <img :src="codeUrl" class="login-code-img" @click="getCode" />
                            <img
                                :src="codeUrl"
                                class="login-code-img"
                                @click="getCode"
                            />
            </div>
          </el-form-item>
          <el-checkbox
@@ -123,7 +130,7 @@
          <div class="other-title">
            <span style="color: #b3b8c1">其他登录方式:</span
            ><span style="color: #2d5eff; cursor: pointer">
              <SvgIcon icon-class="phone" />手机验证码登录
                            <svg-icon icon-class="phone" />手机验证码登录
            </span>
          </div>
          <div class="forget">忘记密码?</div>
@@ -137,6 +144,7 @@
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from "@/utils/jsencrypt";
import SvgIcon from '@/components/SvgIcon/index.vue';
export default {
  name: "Login",
@@ -167,6 +175,9 @@
      register: false,
      redirect: undefined,
    };
    },
    comments: {
        SvgIcon
  },
  watch: {
    $route: {
@@ -215,7 +226,6 @@
      console.log(this.loginForm);
    },
    handleLogin() {
      debugger
      this.$refs.loginRef.validate((valid) => {
        if (valid) {
          this.loading = true;
@@ -271,7 +281,7 @@
    align-items: center;
    gap: 100px;
    height: calc(100vh - 50px);
    background-image: url("../assets/images/login-background.png");
        background-image: url('../assets/images/login-background.png');
    background-size: cover;
    .left {
@@ -285,7 +295,7 @@
      }
      .img {
        background-image: url("../assets/images/login.png");
                background-image: url('../assets/images/login.png');
        background-size: cover;
        height: 295px;
        width: 366px;