src/utils/axios.ts
@@ -57,7 +57,6 @@ // 前置拦截器(发起请求之前的拦截) instance.interceptors.request.use((config: AxiosRequestConfig) => { console.log('sss',config) config.headers && (config.headers['Authorization'] = getToken()) const controller = new AbortController() config.signal = controller.signal @@ -69,7 +68,6 @@ instance.interceptors.response.use( (response: AxiosResponse) => { const { data, status } = response console.log('返回结果',data) const { message } = data // 请求正常时,仅返回需要用到的 data 信息即可 if (message==='SUCCESS') return data.data