로그인 에러 메세지 표출
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-09-07 19:04:18 +09:00
parent e084436c90
commit da397b21b0
2 changed files with 11 additions and 4 deletions
+9 -2
View File
@@ -105,6 +105,7 @@
data: $('#loginForm').serialize(),
dataType: 'json',
success: function(response) {
console.log('res', response)
if (response.changePassword) {
showChangeInitPassword(response);
}
@@ -116,8 +117,14 @@
// 직접 로그인 성공
window.location.href = response.redirectUrl;
} else {
// 로그인 실패
alert('로그인에 실패했습니다');
if (response.errorMessage == 'NO_PHONE_NUMBER') {
alert("휴대폰번호가 등록되어 있지 않아 로그인할 수 없습니다. 관리자에게 문의하세요")
} else if (response.errorMessage == 'FAIL_SEND_AUTH') {
alert("인증번호 발송에 실패했습니다. 잠시 후 다시 시도해주세요.")
} else {
// 로그인 실패
alert('로그인에 실패했습니다');
}
}
},
error: function(xhr, status, error) {
@@ -223,7 +223,7 @@ public class MainController implements InterceptorSkipController {
// 휴대폰번호 없는 사용자
return LoginResponseDto.builder()
.success(false)
.errorMessage("휴대폰번호가 등록되어 있지 않아 로그인할 수 없습니다. 관리자에게 문의하세요.")
.errorMessage("NO_PHONE_NUMBER")
.build();
}
@@ -234,7 +234,7 @@ public class MainController implements InterceptorSkipController {
if (!sent) {
return LoginResponseDto.builder()
.success(false)
.errorMessage("인증번호 발송에 실패했습니다. 잠시 후 다시 시도해주세요.")
.errorMessage("FAIL_SEND_AUTH")
.build();
}