From e49b5e0e5c8ea12a7826b4681d09d35549e6acda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Wed, 13 Aug 2025 18:09:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor(vue.config.js):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97=E5=92=8C=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=8E=89=E7=9A=84=E4=BB=A3=E7=90=86=E8=AF=B7=E6=B1=82=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理不再需要的调试配置,简化代理设置,提高代码整洁度 --- vue.config.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/vue.config.js b/vue.config.js index 81a19cf..6fa1890 100644 --- a/vue.config.js +++ b/vue.config.js @@ -40,11 +40,6 @@ module.exports = { '/dev-api/assembly-api': { target: 'http://localhost:7000', // 后端接口地址 changeOrigin: true, - logLevel: 'debug', - onProxyReq: (proxyReq, req) => { - // http请求 - console.log('[HPM] %s %s %s %s', req.method, req.originalUrl, '->', req.url); - }, pathRewrite: { '^/dev-api/assembly-api': '', //需要rewrite的 }, @@ -54,11 +49,11 @@ module.exports = { target: 'http://localhost:8888', // 后端接口地址 // target: 'http://192.168.0.31:8888/', // 后端接口地址 changeOrigin: true, - logLevel: 'debug', - onProxyReq: (proxyReq, req) => { - // http请求 - console.log('[HPM] %s %s %s %s', req.method, req.originalUrl, '->', req.url); - }, + // logLevel: 'debug', + // onProxyReq: (proxyReq, req) => { + // // http请求 + // console.log('[HPM] %s %s %s %s', req.method, req.originalUrl, '->', req.url); + // }, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '', //需要rewrite的 },