假设跨域访问地址为http://localhost:4000/xxx 第一步 config/index.js中配置代理如下图:使用访问时,路径填写时 '/api/xxxx' npm start 由于改了配置,需要重启一下