diff --git a/core/core-frontend/src/views/share/share/ShareHandler.vue b/core/core-frontend/src/views/share/share/ShareHandler.vue index 96d4dc9b59..10283cdf62 100644 --- a/core/core-frontend/src/views/share/share/ShareHandler.vue +++ b/core/core-frontend/src/views/share/share/ShareHandler.vue @@ -150,7 +150,8 @@ import { ShareInfo, SHARE_BASE, shortcuts } from './option' import { ElMessage, ElLoading } from 'element-plus-secondary' import useClipboard from 'vue-clipboard3' import ShareTicket from './ShareTicket.vue' - +import { useEmbedded } from '@/store/modules/embedded' +const embeddedStore = useEmbedded() const { toClipboard } = useClipboard() const { t } = useI18n() const props = defineProps({ @@ -311,8 +312,8 @@ const formatLinkAddr = () => { } const formatLinkBase = () => { let prefix = '/' - if (window.DataEaseBi?.baseUrl) { - prefix = window.DataEaseBi.baseUrl + '#' + if (embeddedStore.baseUrl) { + prefix = embeddedStore.baseUrl + '#' } else { const href = window.location.href prefix = href.substring(0, href.indexOf('#') + 1) diff --git a/core/core-frontend/src/views/share/share/ShareVisualHead.vue b/core/core-frontend/src/views/share/share/ShareVisualHead.vue index 6ad0ddbdd4..050e073c1a 100644 --- a/core/core-frontend/src/views/share/share/ShareVisualHead.vue +++ b/core/core-frontend/src/views/share/share/ShareVisualHead.vue @@ -143,7 +143,8 @@ import { ShareInfo, SHARE_BASE, shortcuts } from './option' import { ElMessage, ElLoading } from 'element-plus-secondary' import useClipboard from 'vue-clipboard3' import ShareTicket from './ShareTicket.vue' - +import { useEmbedded } from '@/store/modules/embedded' +const embeddedStore = useEmbedded() const { toClipboard } = useClipboard() const { t } = useI18n() const props = defineProps({ @@ -282,8 +283,8 @@ const formatLinkAddr = () => { } const formatLinkBase = () => { let prefix = '/' - if (window.DataEaseBi?.baseUrl) { - prefix = window.DataEaseBi.baseUrl + '#' + if (embeddedStore.baseUrl) { + prefix = embeddedStore.baseUrl + '#' } else { const href = window.location.href prefix = href.substring(0, href.indexOf('#') + 1)