fix(嵌入式): div嵌入式创建公共链接地址错误

This commit is contained in:
fit2cloud-chenyw 2024-07-01 21:13:02 +08:00
parent 157eb34790
commit 97b9f9bfe3
2 changed files with 8 additions and 6 deletions

View File

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

View File

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