Skip to content

Commit

Permalink
fix(other): 修復设备列表订阅
Browse files Browse the repository at this point in the history
standard
  • Loading branch information
h7ml committed Jun 22, 2022
1 parent 95e1528 commit 7c0e8bc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand Down
4 changes: 2 additions & 2 deletions src/views/DeviceCloud/manage/devicelist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/views/DeviceCloud/manage/home_index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7c0e8bc

Please sign in to comment.