lixuliang
2024-09-10 1d5aa0260234e327cae874e10a21e09f730f095b
se-ui/src/views/register.vue
@@ -1,7 +1,7 @@
<template>
  <div class="register">
    <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
      <h3 class="title">若依后台管理系统</h3>
      <h3 class="title">后台管理系统</h3>
      <el-form-item prop="username">
        <el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
@@ -61,7 +61,7 @@
    </el-form>
    <!--  底部  -->
    <div class="el-register-footer">
      <span>Copyright © 2018-2024 ruoyi.vip All Rights Reserved.</span>
      <span>Copyright © 2018-2024 se.vip All Rights Reserved.</span>
    </div>
  </div>
</template>
@@ -109,17 +109,17 @@
    };
  },
  created() {
    this.getCode();
    // this.getCode();
  },
  methods: {
    getCode() {
      getCodeImg().then(res => {
        this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
        if (this.captchaEnabled) {
          this.codeUrl = "data:image/gif;base64," + res.img;
          this.registerForm.uuid = res.uuid;
        }
      });
      // getCodeImg().then(res => {
      //   this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
      //   if (this.captchaEnabled) {
      //     this.codeUrl = "data:image/gif;base64," + res.img;
      //     this.registerForm.uuid = res.uuid;
      //   }
      // });
    },
    handleRegister() {
      this.$refs.registerForm.validate(valid => {
@@ -136,7 +136,7 @@
          }).catch(() => {
            this.loading = false;
            if (this.captchaEnabled) {
              this.getCode();
              // this.getCode();
            }
          })
        }