修改config文件夹下的index.js文件:
proxyTable: {
'/batteryhisurl': { /**电池历史数据页面**/
target: 'https://www.baidu.com',
changeOrigin: true,
pathRewrite: {
'^/batteryhisurl': '' //重写接口,去掉/api
}
}
},