vue.config.js
@@ -33,13 +33,16 @@ host: 'localhost', port: port, open: true, headers: { "Access-Control-Allow-Origin": "*", }, proxy: { // 跨域配置 [process.env.VUE_APP_BASE_API]: { target: `http://localhost:8080`, "/api": { target: `http://42.193.1.25:8082`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' "^/api": '' } } },