lixuliang
2024-09-10 1d5aa0260234e327cae874e10a21e09f730f095b
se-ui/src/views/register.vue
@@ -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();
            }
          })
        }