From 613a24c1894a536cf617279c65e9b637a6afaba4 Mon Sep 17 00:00:00 2001 From: "1054959069@qq.com" <1054959069@qq.com> Date: Thu, 14 Nov 2024 12:16:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(setupAppVersionNotification):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=BD=93=E5=A4=84=E4=BA=8E=E5=A4=84=E4=BA=8E=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E7=9B=AE=E5=BD=95=E6=97=B6=EF=BC=8C=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/app.ts b/src/plugins/app.ts index f2080ef7..b84f37ac 100644 --- a/src/plugins/app.ts +++ b/src/plugins/app.ts @@ -64,7 +64,8 @@ export function setupAppVersionNotification() { } async function getHtmlBuildTime() { - const res = await fetch(`/index.html?time=${Date.now()}`); + const baseUrl = import.meta.env.VITE_BASE_URL === '/' ? '' : import.meta.env.VITE_BASE_URL + const res = await fetch(`${baseUrl}/index.html?time=${Date.now()}`); const html = await res.text();