- 在config文件夹中找到index.js
- index.js dev配置下的proxyTable中添加
proxyTable:{
'/graphql': {
target: 'https://172.26.31.80',
changeOrigin: true,
// ws: true,
pathRewrite: {
'^/graphql': '/graphql'
},
secure: false,
},
// http
'/index': {
target: 'http://172.26.31.80:22220',
pathRewrite: {
'^/index': '/agent'
// -> 可以使用 /index 等价于 后台接口的/agilescan
}
},
}
按照上面配置然后直接调用接口就可以了~