From 4c34fe9b85fe19be19b3c9f4b0e1a5ca0f8eed87 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 4 Jun 2025 16:27:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=95=86=E5=BA=97=E5=8F=82=E6=95=B0=E5=A4=B1=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/store/actions.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js index e63ba1745..eb7ce11b9 100644 --- a/resources/assets/js/store/actions.js +++ b/resources/assets/js/store/actions.js @@ -4675,6 +4675,11 @@ export default { if (!data.id || !data.name || !data.url) { return } + data.url = data.url.replace(/\{window[._]location[._](\w+)}/ig, (match, property) => { + if (property in window.location) { + return window.location[property]; + } + }) const config = { id: data.id, name: data.name, @@ -4697,12 +4702,7 @@ export default { .replace(/\{user_token}/g, encodeURIComponent(state.userToken)) .replace(/\{system_theme}/g, state.systemConfig.themeName) .replace(/\{system_lang}/g, languageName) - .replace(/\{system_base_url}/g, $A.mainUrl('').replace(/\/$/, '')) - .replace(/\{window_location_(\w+)}/g, (match, property) => { - if (property in window.location) { - return window.location[property]; - } - }); + .replace(/\{system_base_url}/g, $A.mainUrl('').replace(/\/$/, '')); emitter.emit('observeMicroApp:open', config); },