Merge pull request #7912 from dataease/pr@dev-v2@fix_embedded_tree_share

fix: 嵌入式场景分享链接错误
This commit is contained in:
fit2cloud-chenyw 2024-01-30 16:16:45 +08:00 committed by GitHub
commit 76b3869a85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 4 deletions

View File

@ -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
}

View File

@ -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
}