From 1e81272e9a77f6701de5990e268f7efee20d43e1 Mon Sep 17 00:00:00 2001 From: JayJiaJun Date: Fri, 30 May 2025 16:23:13 +0800 Subject: [PATCH] 5.30 --- pages/common/webview/index.vue | 18 +++++++++++++++++- pagesA/home/device/status/index.vue | 21 ++++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/pages/common/webview/index.vue b/pages/common/webview/index.vue index c139ef1..ddb11fd 100644 --- a/pages/common/webview/index.vue +++ b/pages/common/webview/index.vue @@ -1,6 +1,6 @@ @@ -34,5 +34,21 @@ this.loading = false; }, 1000); }, + methods: { + handleMessage(e) { + console.log('[DEBUG] Webview收到消息:', e.detail); + // 处理接收到的消息 + if (e.detail && e.detail.data) { + const data = e.detail.data; + console.log('[DEBUG] 消息数据:', data); + + // 如果消息中包含type和data字段 + if (data.type && data.data) { + console.log('[DEBUG] 消息类型:', data.type); + console.log('[DEBUG] 消息内容:', data.data); + } + } + } + } } \ No newline at end of file diff --git a/pagesA/home/device/status/index.vue b/pagesA/home/device/status/index.vue index 0ae1ad2..aa42b91 100644 --- a/pagesA/home/device/status/index.vue +++ b/pagesA/home/device/status/index.vue @@ -8,18 +8,24 @@ - + - + + + + + + + @@ -27,6 +33,8 @@ import baseStatus from './base.vue'; import deviceVariable from './variable.vue'; import relayControl from './relay.vue'; + import voice from './voice.vue'; + import gateway from './gateway.vue'; // import GRelay from './GRelay.vue' export default { @@ -35,7 +43,8 @@ baseStatus, deviceVariable, relayControl, - + voice, + gateway }, props: { device: { @@ -50,6 +59,8 @@ this.deviceInfo = newVal; this.isSubDev = newVal.subDeviceList && newVal.subDeviceList.length > 0; this.isRelayProduct = newVal.productName === '多路控制器'; + this.isVoiceProduct = newVal.productName === '声卡'; + this.isGatewayProduct = newVal.productName === '网关卡兼容'; } }, data() { @@ -58,6 +69,8 @@ current: 0, isSubDev: false, isRelayProduct: false, + isVoiceProduct: false, + isGatewayProduct: false, deviceInfo: {} // 设备信息 }; }, @@ -69,6 +82,8 @@ this.isSubDev = this.device.subDeviceList.length > 0; } this.isRelayProduct = this.device.productName === '继电器测试'; + this.isVoiceProduct = this.device.productName === '声卡'; + this.isGatewayProduct = this.device.productName === '网关卡兼容'; console.log("create的数据", JSON.stringify(this.deviceInfo)) },