diff --git a/src/views/login.vue b/src/views/login.vue index b5ad5b90..18adece3 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -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; + } } }); }