diff --git a/src/components/global.vue b/src/components/global.vue index 492c0ae..1f38926 100644 --- a/src/components/global.vue +++ b/src/components/global.vue @@ -230,21 +230,18 @@ console.log('接收消息', data) if (data.cmd == 'HEARTBEAT') { if (data.deviceStatus == 'ABNORMAL' && this.DYZshow) { - // const addr = require('../assets/audio/ExceptionNotice.mp3') - // this.play(addr) if (!this.cite.ztyc) { this.numZt = 120 this.onNum() } - // // 判断异常语音 - // if (data.abnormalReason !== '') { - // console.log('执行了') - // this.cite.serveError = true - // } else { - // this.cite.serveError = false - // } this.cite.ztyc = true } + // 判断异常语音 + if (data.abnormalReason !== undefined) { + this.cite.serveError = true + } else { + this.cite.serveError = false + } } else if (data.cmd == 'ORDER_INFO') { //小程序支付 this.DYZshow = true