From 823dc8462fd969c2615aeeb6d81cfc7d956ac318 Mon Sep 17 00:00:00 2001 From: wood911010 Date: Fri, 5 Sep 2025 21:49:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E4=BD=BF=E7=94=A8=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.production | 4 ++-- frontend/vite.config.ts | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/frontend/.env.production b/frontend/.env.production index 75acfd8..2b1a043 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -1,5 +1,5 @@ -# 正式环境接口地址 -VITE_API_BASE_URL = 'http://104.156.140.42:18888' +# 正式环境接口地址 - 自动匹配当前域名 +VITE_API_BASE_URL = '/api' # 正式环境打包名称 VITE_OUTDIR='production' diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index fab8497..571ed84 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -65,13 +65,6 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { hmr: { overlay: true }, - // 代理配置 (已直接配置 API 基础地址,不需要代理) - // proxy: { - // "/": { - // target: "http://104.156.140.42:18888/", - // changeOrigin: true, - // }, - // } }, // 依赖优化配置