| | |
| | | }; |
| | | }, |
| | | 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 => { |
| | |
| | | }).catch(() => { |
| | | this.loading = false; |
| | | if (this.captchaEnabled) { |
| | | this.getCode(); |
| | | // this.getCode(); |
| | | } |
| | | }) |
| | | } |