FEAT => 本次更新项目为:

基础配置传递过去了
This commit is contained in:
超级老白兔
2025-08-02 19:58:49 +08:00
parent 947f5c0f6b
commit 65f80c55b0
3 changed files with 46 additions and 18 deletions

View File

@@ -43,7 +43,7 @@
CONNECT: 0,
DATA: 1,
FUNCTION: 2,
CONFIG: 3,
}
export default {
data() {
@@ -56,10 +56,7 @@
}
},
onLoad() {
this.buildIframeUrl();
setTimeout(() => {
this.sendMessageToIframeConnect()
}, 1000);
this.sendBaseConfig()
},
methods: {
// 构建 iframe URL包含参数
@@ -96,13 +93,14 @@
console.log('[App]SendMessage=>\n' + JSON.stringify(message));
},
// 发送消息到 iframe通过URL传参
async sendMessageToIframeConnect() {
async sendBaseConfig() {
const message = {
type: TYPE_EMUE.CONNECT,
type: TYPE_EMUE.CONFIG,
data: {
action: 'ping',
content: '联通测试通过',
timestamp: Date.now()
paddingTop: await getTopSafeAreaHeightAsync(),
appId: '1234567890',
appName: '存客宝',
appVersion: '1.0.0',
}
};