mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复登录失败没有提示
This commit is contained in:
parent
6df651aa63
commit
3ab5b0d86b
|
@ -57,9 +57,10 @@ const errorHandler = function (
|
|||
return error.config?.onError(error.response);
|
||||
}
|
||||
|
||||
msg &&
|
||||
notification.error({
|
||||
message: msg,
|
||||
description: (
|
||||
description: error.response?.data?.errors ? (
|
||||
<>
|
||||
{error.response?.data?.errors?.map((item: any) => (
|
||||
<div>
|
||||
|
@ -67,7 +68,7 @@ const errorHandler = function (
|
|||
</div>
|
||||
))}
|
||||
</>
|
||||
),
|
||||
) : undefined,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
@ -117,13 +118,13 @@ _request.interceptors.response.use(async (response) => {
|
|||
msg &&
|
||||
notification.error({
|
||||
message: msg,
|
||||
description: (
|
||||
description: res?.errors ? (
|
||||
<>
|
||||
{res?.errors.map((item: any) => (
|
||||
<div>{item.message}</div>
|
||||
))}
|
||||
</>
|
||||
),
|
||||
) : undefined,
|
||||
});
|
||||
}
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue
Block a user