guoshipeng
2023-09-08 bba69a0ccdfe3dddab920aa0de16fb33c0f3693b
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;