From 7c0e8bc71db5204fbb41ff563fda4d8e58f5055a Mon Sep 17 00:00:00 2001 From: h7ml Date: Wed, 22 Jun 2022 19:19:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(other):=20=E4=BF=AE=E5=BE=A9=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=88=97=E8=A1=A8=E8=AE=A2=E9=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit standard --- CHANGELOG.EN.md | 1 + CHANGELOG.ZH.md | 1 + CHANGELOG.md | 1 + src/views/DeviceCloud/manage/devicelist.vue | 4 ++-- src/views/DeviceCloud/manage/home_index.vue | 4 ++-- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.EN.md b/CHANGELOG.EN.md index e3cf88a7f4..2d3b3b1158 100644 --- a/CHANGELOG.EN.md +++ b/CHANGELOG.EN.md @@ -3,6 +3,7 @@ ### Features +* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee)) * **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8)) diff --git a/CHANGELOG.ZH.md b/CHANGELOG.ZH.md index e3cf88a7f4..2d3b3b1158 100644 --- a/CHANGELOG.ZH.md +++ b/CHANGELOG.ZH.md @@ -3,6 +3,7 @@ ### Features +* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee)) * **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8)) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3cf88a7f4..2d3b3b1158 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features +* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee)) * **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8)) diff --git a/src/views/DeviceCloud/manage/devicelist.vue b/src/views/DeviceCloud/manage/devicelist.vue index 970bf33777..e3a3da31fb 100644 --- a/src/views/DeviceCloud/manage/devicelist.vue +++ b/src/views/DeviceCloud/manage/devicelist.vue @@ -1089,8 +1089,8 @@ async subAllDevice() { let _this = this // await _this.$subscribe('$dg/user/devicestate/#') - _this.$dgiotBus.$off(_this.$mqttInfo.topicKey) - _this.$dgiotBus.$on(_this.$mqttInfo.topicKey, (Msg) => { + _this.$dgiotBus.$off('devicestate') + _this.$dgiotBus.$on('devicestate', (Msg) => { const parseString = JSON.parse(Msg.payloadString) console.log('收到消息', parseString) if (parseString) { diff --git a/src/views/DeviceCloud/manage/home_index.vue b/src/views/DeviceCloud/manage/home_index.vue index 69fb51a970..e45c03ce8e 100644 --- a/src/views/DeviceCloud/manage/home_index.vue +++ b/src/views/DeviceCloud/manage/home_index.vue @@ -1220,8 +1220,8 @@ async subAllDevice() { let _this = this // await _this.$subscribe('$dg/user/devicestate/#') - _this.$dgiotBus.$off(_this.$mqttInfo.topicKey) - _this.$dgiotBus.$on(_this.$mqttInfo.topicKey, (Msg) => { + _this.$dgiotBus.$off('devicestate') + _this.$dgiotBus.$on('devicestate', (Msg) => { const parseString = JSON.parse(Msg.payloadString) console.log('收到消息', parseString) if (parseString) {