更新 src/api/axios.ts
修改
This commit is contained in:
parent
d530c65350
commit
3334335592
@ -51,6 +51,9 @@ axiosInstance.interceptors.response.use(
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
const { code } = res.data as { code: number }
|
||||
|
||||
const responseData = res as AxiosResponse<any>
|
||||
const { code } = responseData.data as { code: number }
|
||||
|
||||
if (code === undefined || code === null) return Promise.resolve(res.data)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user