diff --git a/src/views/DeviceCloud/manage/devicelist.vue b/src/views/DeviceCloud/manage/devicelist.vue index f8b518c812..64e34209d5 100644 --- a/src/views/DeviceCloud/manage/devicelist.vue +++ b/src/views/DeviceCloud/manage/devicelist.vue @@ -1083,7 +1083,7 @@ }, async subAllDevice() { await this.$subscribe('$dg/user/devicestate/#') - this.$dgiotBus.$on('/$dg/user', (Msg) => { + this.$dgiotBus.$on('/$dg/user/devicestate', (Msg) => { console.log('收到消息', Msg) const parseString = JSON.parse(Msg.payloadString) console.log('收到消息', parseString) diff --git a/src/views/DeviceCloud/manage/home_index.vue b/src/views/DeviceCloud/manage/home_index.vue index 816beffbf3..0d2d9e96fc 100644 --- a/src/views/DeviceCloud/manage/home_index.vue +++ b/src/views/DeviceCloud/manage/home_index.vue @@ -1216,7 +1216,7 @@ }, async subAllDevice() { await this.$subscribe('$dg/user/devicestate/#') - this.$dgiotBus.$on('/$dg/user', (Msg) => { + this.$dgiotBus.$on('/$dg/user/devicestate', (Msg) => { console.log('收到消息', Msg) const parseString = JSON.parse(Msg.payloadString) console.log('收到消息', parseString)