|
|
@@ -49,11 +49,11 @@ export default {
|
|
|
this.$timer = -1
|
|
|
},
|
|
|
mounted () {
|
|
|
- subscribe([`+/${this.deviceId}/apk/upgrade/progress`], this.onMessage)
|
|
|
+ this.status === 1 && subscribe([`+/${this.deviceId}/apk/upgrade/progress`], this.onMessage)
|
|
|
},
|
|
|
beforeDestroy () {
|
|
|
clearTimeout(this.$timer)
|
|
|
- unsubscribe([`+/${this.deviceId}/apk/upgrade/progress`], this.onMessage)
|
|
|
+ this.status === 1 && unsubscribe([`+/${this.deviceId}/apk/upgrade/progress`], this.onMessage)
|
|
|
},
|
|
|
methods: {
|
|
|
onMessage (topic, message) {
|