From d2a41dffe94437f9759781e811f7a38035203783 Mon Sep 17 00:00:00 2001 From: brother7 <7brother7@gmail.com> Date: Tue, 30 Jun 2026 15:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=93=E5=8C=85=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 ++-- env.d.ts | 1 + vite.config.ts | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index bc2a177..05a6cbc 100644 --- a/.env.production +++ b/.env.production @@ -1,7 +1,7 @@ VITE_USE_MOCK=false +VITE_APP_BASE=/hotel-staff-h5/ VITE_PROXY_TARGET= -#VITE_API_BASE_URL=https://biz.nianxx.cn/ -VITE_API_BASE_URL= +VITE_API_BASE_URL=https://biz.nianxx.cn VITE_AUTH_BASE=/auth VITE_ADMIN_BASE=/admin VITE_STAFF_BASE=/hotelStaff diff --git a/env.d.ts b/env.d.ts index 64ad23a..b69db06 100644 --- a/env.d.ts +++ b/env.d.ts @@ -2,6 +2,7 @@ interface ImportMetaEnv { readonly VITE_USE_MOCK?: string + readonly VITE_APP_BASE?: string readonly VITE_PROXY_TARGET?: string readonly VITE_API_BASE_URL?: string readonly VITE_AUTH_BASE?: string diff --git a/vite.config.ts b/vite.config.ts index 6feb9f8..8149ec3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,8 +5,10 @@ import vue from '@vitejs/plugin-vue' export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), '') const proxyTarget = env.VITE_PROXY_TARGET || 'http://localhost:9999' + const base = env.VITE_APP_BASE || '/' return { + base, plugins: [vue()], resolve: { alias: {