34
chenyc
2022-10-21 9472c3489eb7bb0316f34aece30d1c16f939c492
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