fix: 嵌入式场景分享链接错误

This commit is contained in:
fit2cloud-chenyw 2024-01-30 16:14:36 +08:00
parent a5237b06dd
commit 72866386b8
2 changed files with 14 additions and 4 deletions

View File

@ -186,8 +186,13 @@ const enableSwitcher = () => {
} }
const formatLinkAddr = () => { const formatLinkAddr = () => {
const href = window.location.href let prefix = '/'
const prefix = href.substring(0, href.indexOf('#') + 1) 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 linkAddr.value = prefix + SHARE_BASE + state.detailInfo.uuid
} }

View File

@ -190,8 +190,13 @@ const enableSwitcher = () => {
} }
const formatLinkAddr = () => { const formatLinkAddr = () => {
const href = window.location.href let prefix = '/'
const prefix = href.substring(0, href.indexOf('#') + 1) 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 linkAddr.value = prefix + SHARE_BASE + state.detailInfo.uuid
} }