This commit is contained in:
guochunsi
2026-01-22 10:37:27 +08:00
parent 38ebce9769
commit 790b22a7fc
2 changed files with 15 additions and 29 deletions

View File

@@ -97,6 +97,10 @@ service.interceptors.request.use(
*/
const handleResponse = (response: AxiosResponse<any>) => {
if (response.data.code === 1) {
// 业务错误,统一弹出错误提示
if (response.data.msg) {
useMessage().error(response.data.msg);
}
throw response.data;
}