修改验证码开关变量名
This commit is contained in:
parent
331dbc44b2
commit
6c19bfbd90
|
@ -37,7 +37,7 @@
|
||||||
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaOnOff">
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
<el-input
|
<el-input
|
||||||
size="large"
|
size="large"
|
||||||
v-model="registerForm.code"
|
v-model="registerForm.code"
|
||||||
|
@ -116,7 +116,7 @@ const registerRules = {
|
||||||
|
|
||||||
const codeUrl = ref("");
|
const codeUrl = ref("");
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const captchaOnOff = ref(true);
|
const captchaEnabled = ref(true);
|
||||||
|
|
||||||
function handleRegister() {
|
function handleRegister() {
|
||||||
proxy.$refs.registerRef.validate(valid => {
|
proxy.$refs.registerRef.validate(valid => {
|
||||||
|
@ -132,7 +132,7 @@ function handleRegister() {
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (captchaOnOff) {
|
if (captchaEnabled) {
|
||||||
getCode();
|
getCode();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -142,8 +142,8 @@ function handleRegister() {
|
||||||
|
|
||||||
function getCode() {
|
function getCode() {
|
||||||
getCodeImg().then(res => {
|
getCodeImg().then(res => {
|
||||||
captchaOnOff.value = res.captchaOnOff === undefined ? true : res.captchaOnOff;
|
captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||||
if (captchaOnOff.value) {
|
if (captchaEnabled.value) {
|
||||||
codeUrl.value = "data:image/gif;base64," + res.img;
|
codeUrl.value = "data:image/gif;base64," + res.img;
|
||||||
registerForm.value.uuid = res.uuid;
|
registerForm.value.uuid = res.uuid;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue