mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: axios 响应拦截错误提示
This commit is contained in:
parent
fe50d7b3f2
commit
463cdd2ae1
|
|
@ -39,8 +39,9 @@ instance.interceptors.request.use(
|
|||
instance.interceptors.response.use(
|
||||
(response: any) => {
|
||||
if (response.data) {
|
||||
if (response.status !== 200 && !(response.data instanceof Blob)) {
|
||||
if (response.data.code !== 200 && !(response.data instanceof Blob)) {
|
||||
MsgError(response.data.message)
|
||||
return Promise.reject(response.data)
|
||||
}
|
||||
}
|
||||
return response
|
||||
|
|
|
|||
Loading…
Reference in New Issue