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 = () => {
let prefix = '/'
if (window.DataEaseBi?.baseUrl) {
prefix = window.DataEaseBi.baseUrl + '#'
} else {
const href = window.location.href
const prefix = href.substring(0, href.indexOf('#') + 1)
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 = () => {
let prefix = '/'
if (window.DataEaseBi?.baseUrl) {
prefix = window.DataEaseBi.baseUrl + '#'
} else {
const href = window.location.href
const prefix = href.substring(0, href.indexOf('#') + 1)
prefix = href.substring(0, href.indexOf('#') + 1)
}
linkAddr.value = prefix + SHARE_BASE + state.detailInfo.uuid
}