Skip to content

Commit

Permalink
修改验证码开关变量名
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzongzhuan committed Jul 15, 2022
1 parent 10ffc12 commit 3b13a36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/views/register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaOnOff">
<el-form-item prop="code" v-if="captchaEnabled">
<el-input
size="large"
v-model="registerForm.code"
Expand Down Expand Up @@ -116,7 +116,7 @@ const registerRules = {
const codeUrl = ref("");
const loading = ref(false);
const captchaOnOff = ref(true);
const captchaEnabled = ref(true);
function handleRegister() {
proxy.$refs.registerRef.validate(valid => {
Expand All @@ -132,7 +132,7 @@ function handleRegister() {
}).catch(() => {});
}).catch(() => {
loading.value = false;
if (captchaOnOff) {
if (captchaEnabled) {
getCode();
}
});
Expand All @@ -142,8 +142,8 @@ function handleRegister() {
function getCode() {
getCodeImg().then(res => {
captchaOnOff.value = res.captchaOnOff === undefined ? true : res.captchaOnOff;
if (captchaOnOff.value) {
captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (captchaEnabled.value) {
codeUrl.value = "data:image/gif;base64," + res.img;
registerForm.value.uuid = res.uuid;
}
Expand Down

0 comments on commit 3b13a36

Please sign in to comment.