| | |
| | | <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" /> |
| | |
| | | </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> |
| | |
| | | }; |
| | | }, |
| | | 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(); |
| | | } |
| | | }) |
| | | } |