fix: vite 代理端口 18080→18082,匹配 HIS 后端实际端口

问题:vite proxy 指向 18080(被 hysteria2 占用),后端实际运行在 18082
影响:所有 /dev-api 请求返回 400/502,前端页面无法加载
This commit is contained in:
2026-06-01 11:43:21 +08:00
parent 296e825fbd
commit b0e7b8844d

View File

@@ -40,7 +40,7 @@ export default defineConfig(({ mode, command }) => {
proxy: { proxy: {
// https://cn.vitejs.dev/config/#server-proxy // https://cn.vitejs.dev/config/#server-proxy
'/dev-api': { '/dev-api': {
target: 'http://localhost:18080/openhis', target: 'http://localhost:18082/openhis',
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, ''), rewrite: (p) => p.replace(/^\/dev-api/, ''),
}, },