diff --git a/lesingle-aicreate-client/src/utils/bridge.js b/lesingle-aicreate-client/src/utils/bridge.js index 1c76607..e75094f 100644 --- a/lesingle-aicreate-client/src/utils/bridge.js +++ b/lesingle-aicreate-client/src/utils/bridge.js @@ -4,7 +4,7 @@ */ import config from './config' // const VITE_CREATE_POST_MESSAGE_URL = import.meta.env.VITE_CREATE_POST_MESSAGE_URL; -const VITE_AI_POST_MESSAGE_URL = location.origin; +const VITE_CREATE_POST_MESSAGE_URL = location.origin; const SOURCE = 'leai-creation' const VERSION = 1 const TIMEOUT = 30000 @@ -18,7 +18,7 @@ const targetOrigin = config.parentOrigins.length > 0 ? config.parentOrigins[0] : export function send(type, payload = {}) { if (!isEmbedded) return - window.parent.postMessage({ source: SOURCE, version: VERSION, type, payload }, VITE_AI_POST_MESSAGE_URL) + window.parent.postMessage({ source: SOURCE, version: VERSION, type, payload }, VITE_CREATE_POST_MESSAGE_URL) } export function request(type, payload = {}) { if (!isEmbedded) return Promise.reject(new Error('Not in iframe'))