mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-27 20:11:21 +08:00
增加 500 错误信息提示
This commit is contained in:
@@ -25,12 +25,19 @@ axios.interceptors.response.use(
|
||||
detail,
|
||||
};
|
||||
|
||||
const message = useMessage();
|
||||
|
||||
/** token 过期 */
|
||||
if (error.status === 401) {
|
||||
const { auth } = useAuth();
|
||||
auth.value = '';
|
||||
}
|
||||
|
||||
if (error.status === 500) {
|
||||
const msg = error.detail ? error.detail : 'Request Error!';
|
||||
message.error(msg);
|
||||
}
|
||||
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user