From b0e7b8844d891618fb5c69642934e00e7eaca8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Mon, 1 Jun 2026 11:43:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20vite=20=E4=BB=A3=E7=90=86=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=2018080=E2=86=9218082=EF=BC=8C=E5=8C=B9=E9=85=8D=20HI?= =?UTF-8?q?S=20=E5=90=8E=E7=AB=AF=E5=AE=9E=E9=99=85=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题:vite proxy 指向 18080(被 hysteria2 占用),后端实际运行在 18082 影响:所有 /dev-api 请求返回 400/502,前端页面无法加载 --- openhis-ui-vue3/vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openhis-ui-vue3/vite.config.js b/openhis-ui-vue3/vite.config.js index 8cff8beef..4367998ae 100755 --- a/openhis-ui-vue3/vite.config.js +++ b/openhis-ui-vue3/vite.config.js @@ -40,7 +40,7 @@ export default defineConfig(({ mode, command }) => { proxy: { // https://cn.vitejs.dev/config/#server-proxy '/dev-api': { - target: 'http://localhost:18080/openhis', + target: 'http://localhost:18082/openhis', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, ''), },