proxyTable 配置两个服务器
proxyTable: {
'/api': {
target: 'http://10.10.10.10:0801',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
'/ipa': {
target: 'http://10.10.10.101:0802',
changeOrigin: true,
pathRewrite: {
'^/ipa': ''
}
}
},
axios 调取不同服务器接口
axios.get('/api/a').then(function(res) {
})
axios.get('/ipa/b').then(function(res) {
})