From 72866386b82c06712fbee89686e4d7b57abb474c Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 30 Jan 2024 16:14:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B5=8C=E5=85=A5=E5=BC=8F=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E5=88=86=E4=BA=AB=E9=93=BE=E6=8E=A5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core-frontend/src/views/share/share/ShareHandler.vue | 9 +++++++-- .../src/views/share/share/ShareVisualHead.vue | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/views/share/share/ShareHandler.vue b/core/core-frontend/src/views/share/share/ShareHandler.vue index 0d2892c9dd..eefb40c500 100644 --- a/core/core-frontend/src/views/share/share/ShareHandler.vue +++ b/core/core-frontend/src/views/share/share/ShareHandler.vue @@ -186,8 +186,13 @@ const enableSwitcher = () => { } const formatLinkAddr = () => { - const href = window.location.href - const prefix = href.substring(0, href.indexOf('#') + 1) + let prefix = '/' + if (window.DataEaseBi?.baseUrl) { + prefix = window.DataEaseBi.baseUrl + '#' + } else { + const href = window.location.href + prefix = href.substring(0, href.indexOf('#') + 1) + } linkAddr.value = prefix + SHARE_BASE + state.detailInfo.uuid } diff --git a/core/core-frontend/src/views/share/share/ShareVisualHead.vue b/core/core-frontend/src/views/share/share/ShareVisualHead.vue index 5de4706a9c..95c47cff67 100644 --- a/core/core-frontend/src/views/share/share/ShareVisualHead.vue +++ b/core/core-frontend/src/views/share/share/ShareVisualHead.vue @@ -190,8 +190,13 @@ const enableSwitcher = () => { } const formatLinkAddr = () => { - const href = window.location.href - const prefix = href.substring(0, href.indexOf('#') + 1) + let prefix = '/' + if (window.DataEaseBi?.baseUrl) { + prefix = window.DataEaseBi.baseUrl + '#' + } else { + const href = window.location.href + prefix = href.substring(0, href.indexOf('#') + 1) + } linkAddr.value = prefix + SHARE_BASE + state.detailInfo.uuid }