quanyawei
2023-09-25 fa0e4d6a9b61b4e5a153d147613ee1133c9c7c71
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import axios from 'axios';
 
class AxiosInterceptor {
    public static init(): void {
        axios.interceptors.response.use((response: any) => {
            // 由于mackjs改写了返回内容,所以这里必须调整
            const data = response.data == null ? response : response.data;
            return data;
        },
        (err: any) => {
        });
    }
}
 
export default AxiosInterceptor;