quanyawei
2024-09-06 60e16bd5406c4cbdf61bf20a50e8e1b49a45b2aa
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;