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 }