proxyTable: {
'/api': {
target: 'https://XXXXXXXX', // 设置你调用的接口域名
changeOrigin: true, // 是否跨域
ws: true,
secure: false,
pathRewrite: {
'^/api': '/' // 这里可以理解为用‘/api’来代替target里面的地址,例如我们调用http://jspang.com/DemoApi/oftenGoods.php,直接写成‘/api/DemoApi/oftenGoods.php’就可以了
},
},
'/picturea': {
target: 'XXXXX', // 设置你调用的接口域名
changeOrigin: true, // 是否跨域
ws: true,
secure: false,
pathRewrite: {
'^/picturea': '/' // 这里可以理解为用‘/api’来代替target里面的地址,例如我们调用http://jspang.com/DemoApi/oftenGoods.php,直接写成‘/api/DemoApi/oftenGoods.php’就可以了
},
},
这里picturea不能为api2,api1