yarn
编辑文件 config/index.js
修改 api
upfile
转发配置
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '',
proxyTable: {
'/api': {
target: 'https://www.test.com/ihrm/29',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
'/upfile': {
target: 'http://172.17.0.65/system/upfile',
changeOrigin: true,
pathRewrite: {
'^/upfile': ''
}
}
},
npm start