forked from github/dataease
fix(嵌入式): iframe嵌入-编辑移动端页面报 iframe 嵌入式域名匹配错误
This commit is contained in:
parent
d2a5045784
commit
977d452544
@ -70,13 +70,16 @@ const componentDataNotInMobile = computed(() => {
|
||||
const newWindow = ref()
|
||||
|
||||
const hanedleMessage = event => {
|
||||
if (event.data?.msgOrigin === 'de-fit2cloud' && !!embeddedStore.token) {
|
||||
if (
|
||||
event.data?.msgOrigin === 'de-fit2cloud' &&
|
||||
!!embeddedStore.token &&
|
||||
!!embeddedStore.baseUrl
|
||||
) {
|
||||
const params = {
|
||||
embeddedToken: embeddedStore.token
|
||||
}
|
||||
params['de-embedded'] = true
|
||||
const contentWindow = newWindow.value.contentWindow
|
||||
console.log('call back from dataease!', contentWindow)
|
||||
contentWindow.postMessage(params, '*')
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user