fix: 使用常量替代验证码成功返回码,并添加验证码文本处理
This commit is contained in:
@@ -77,7 +77,7 @@ function fnGetCaptcha() {
|
||||
state.captchaClick = true;
|
||||
getCaptchaImage().then(res => {
|
||||
state.captchaClick = false;
|
||||
if (res.code != 1) {
|
||||
if (res.code != RESULT_CODE_SUCCESS) {
|
||||
message.warning(`${res.msg}`, 3);
|
||||
return;
|
||||
}
|
||||
@@ -85,6 +85,9 @@ function fnGetCaptcha() {
|
||||
if (state.captcha.enabled) {
|
||||
state.captcha.codeImg = res.img;
|
||||
state.from.uuid = res.uuid;
|
||||
if (res.text) {
|
||||
state.from.code = res.text;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user