caner 1 year ago
parent
commit
afbab9ce16
2 changed files with 3 additions and 4 deletions
  1. 2 1
      src/pages/room/index.vue
  2. 1 3
      src/services/logi.service.ts

+ 2 - 1
src/pages/room/index.vue

@@ -75,7 +75,8 @@ watch(() => store.mqtt_message, async (value: { type: string, data?: RTCSessionD
   }
   // 控制数据
   if (type === 'control') {
-    console.log('发送控制数据')
+    menuList.value[2].vlaue = data ? 1 : 0
+    console.log('发送控制数据', data)
   }
 })
 

+ 1 - 3
src/services/logi.service.ts

@@ -9,12 +9,10 @@ export default class LogiService {
     invoke('start_reading_data').then(() => {
       listen('g923-data', (event: { payload: string }) => {
         const data = this.parseG923Data(event.payload)
-        console.log('解析后的数据:', data)
         this.store.setMqttMessage({ type: 'control', data })
       })
     }).catch((er) => {
-      console.log('罗技eror', er)
-      window.$notification.error({ title: er, duration: 5000 })
+      window.$notification.error({ title: er, duration: 2500 })
     })
   }