From ad408db11877ef71c21e94769fb381e376ac74c4 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2026 22:44:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=89=8D=E7=AB=AFAPI?= =?UTF-8?q?=E5=9F=BA=E5=9D=80=E9=81=BF=E5=85=8D=E8=B7=A8=E5=9F=9F=E9=A2=84?= =?UTF-8?q?=E6=A3=80404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- src/utils/request.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index 8fc1217..56c9231 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,2 @@ # 生产环境(前后端同域部署时可直接使用相对路径) -VITE_API_BASE_URL=/ +VITE_API_BASE_URL=http://localhost:8080/ diff --git a/src/utils/request.js b/src/utils/request.js index f31b46a..0dc0afe 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -3,7 +3,7 @@ import { ElMessage } from 'element-plus' // 创建 axios 实例 const request = axios.create({ - baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:8080', + baseURL: import.meta.env.VITE_API_BASE_URL || '/', timeout: 10000 })