로그인 오류 관련 alert 수정
This commit is contained in:
parent
b374d9ce80
commit
13a80e479a
@ -41,8 +41,14 @@ $api.interceptors.response.use(
|
||||
const loadingStore = useLoadingStore();
|
||||
loadingStore.stopLoading();
|
||||
|
||||
|
||||
// 로그인 요청일 경우 (헤더에 isLogin이 true로 설정된 경우)
|
||||
if (response.config.headers && response.config.headers.isLogin) {
|
||||
return response;
|
||||
}
|
||||
|
||||
// 테스트 부탁
|
||||
// 로그인 실패, 커스텀 에러 응답 처리 (status는 200 success가 false인 경우)
|
||||
// 로그인 실패, 커스텀 에러 응답 처리
|
||||
if (response.data.code > 10000) {
|
||||
const toastStore = useToastStore();
|
||||
const errorCode = response.data.code;
|
||||
|
||||
@ -71,10 +71,10 @@
|
||||
remember: remember.value,
|
||||
}, { headers: { isLogin: true } })
|
||||
.then(async res => {
|
||||
// 로그인 실패 확인 (success가 false인 경우)
|
||||
if (res.data && res.data.success === false) {
|
||||
// 로그인 실패 확인
|
||||
if (res.data.code > 10000) {
|
||||
// 로그인 실패 시 에러 메시지 표시
|
||||
errorMessage.value = res.data.message || '로그인에 실패했습니다.';
|
||||
errorMessage.value = res.data.message;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user