From 86be49dd49a22d16918fd39a69ada5b78e6e120f Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 20 Mar 2024 15:56:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B5=8C=E5=85=A5=E5=BC=8Fdiv=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E5=9C=A8=E5=8A=A8=E6=80=81=E8=AE=BF=E9=97=AE=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=9C=BA=E6=99=AF=E4=B8=8B=E9=9D=99=E6=80=81=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/flushbonading/index.js | 4 ++++ core/core-frontend/src/pages/panel/main.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/core/core-frontend/flushbonading/index.js b/core/core-frontend/flushbonading/index.js index f53b354c67..157407886a 100644 --- a/core/core-frontend/flushbonading/index.js +++ b/core/core-frontend/flushbonading/index.js @@ -99,6 +99,10 @@ htmlStream.pipe(parserStream).on('finish', () => { } if (url.includes(suffix)) { prefix = new URL(url).origin + const index = url.indexOf(\`/js/div_import_${suffix}\`) + if (index > 0) { + prefix = url.substring(0, index) + } return true } } diff --git a/core/core-frontend/src/pages/panel/main.ts b/core/core-frontend/src/pages/panel/main.ts index 8d1a392fb4..4c2ac81423 100644 --- a/core/core-frontend/src/pages/panel/main.ts +++ b/core/core-frontend/src/pages/panel/main.ts @@ -37,6 +37,10 @@ const getPrefix = (): string => { } if (url.includes(suffix)) { prefix = new URL(url).origin + const index = url.indexOf(`/js/div_import_${suffix}`) + if (index > 0) { + prefix = url.substring(0, index) + } return true } }