1.打开src根目录下的app.jsx
    2.按照官网的说法进行request请求拦截配置,即在app.jsx中进行配置
    image.png
    3.app.jsx中引入src/utils/request.js

    1. import { requestInterceptors, responseInterceptors, errorHandler } from '@/utils/Request';

    4.在function getInitialState方法结尾后加入以下代码

    1. export const request = {
    2. errorHandler,
    3. requestInterceptors: [requestInterceptors],
    4. responseInterceptors: [responseInterceptors],
    5. };