vue.config.js
@@ -21,12 +21,12 @@ error: true }, proxy: { "/JiangSu": { target: 'http:localhost/JiangSu',//代理地址 凡是使用/api "/aaaa": { target: 'http:localhost/aaaa',//代理地址 凡是使用/api changeOrigin: true,//允许跨域请求 secure: false, pathRewrite: { //重写路径 替换请求地址中的指定路径 ['^/JiangSu']: '' //将请求地址中的api替换为空 ['^/aaaa']: '' //将请求地址中的api替换为空 } } }