diff --git a/src/api/api.js b/src/api/api.js index b59b9dce..6ced3477 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -71,6 +71,11 @@ instance.interceptors.response.use( case 408: err.tips = "请求超时"; break; + case 422: { + const { data: { message = "错误请求" } = {} } = err.response; + err.tips = message; + break; + } case 500: err.tips = "服务器端出错"; break;