feat: 完成前端业务闭环与后端联调

This commit is contained in:
2026-08-24 23:37:56 +08:00
parent c59e36f933
commit 9ad572907b
175 changed files with 10711 additions and 1740 deletions
+8 -2
View File
@@ -2,10 +2,16 @@ export const getRequestErrorMessage = (error, fallback = '操作未完成,请
if (error?.code === 'NETWORK_ERROR' || error?.code === 'REQUEST_TIMEOUT') {
return '网络不太稳定,请检查网络后重试。'
}
if (error?.code === 'BUSINESS_ERROR' && Number(error.businessCode) === 401) {
if (
(error?.code === 'BUSINESS_ERROR' && Number(error.businessCode) === 401) ||
(error?.code === 'HTTP_ERROR' && Number(error.httpStatus) === 401)
) {
return '登录状态已失效,请重新登录。'
}
if (error?.code === 'BUSINESS_ERROR' && Number(error.businessCode) === 403) {
if (
(error?.code === 'BUSINESS_ERROR' && Number(error.businessCode) === 403) ||
(error?.code === 'HTTP_ERROR' && Number(error.httpStatus) === 403)
) {
return '暂时没有权限进行这项操作。'
}
return fallback