commit | 8166d1b855e4e32fa028f6b24e49caefe2d52e89 | [log] [tgz] |
---|---|---|
author | San3yuan <1071987081@qq.com> | Thu Jun 05 23:15:53 2025 +0800 |
committer | San3yuan <1071987081@qq.com> | Thu Jun 05 23:15:53 2025 +0800 |
tree | 3e8596d29159af3d6c78fc567352def73f2a5825 | |
parent | a2ee30bc73d757f3771cf43399119a31062d0058 [diff] [blame] | |
parent | 7e1e3a5bde541d9971bc4694aba949bf20d54c24 [diff] [blame] |
merge Change-Id: I5227831adac7f85854cbe7321c2a3aa39d8c1d7a
diff --git a/src/utils/axios.ts b/src/utils/axios.ts index 273a9c4..3c9c122 100644 --- a/src/utils/axios.ts +++ b/src/utils/axios.ts
@@ -35,6 +35,9 @@ return Promise.reject(response.data) }, (error) => { + if(error.status===401){ + // window.location.href = '/login'; + } // 统一错误处理 console.error('API Error:', error.response?.status, error.message) return Promise.reject(error)