quanyawei
2023-10-18 e86b3edfe6d0cad7d744828a65ca1330e84fdcde
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;