From 937bcadde77c44b4679fec0035ceaca38cebc646 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 17 Jun 2022 18:29:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppBroadcast/LiveBroadcast.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/apps/AppBroadcast/LiveBroadcast.vue b/src/apps/AppBroadcast/LiveBroadcast.vue index c6120ebf..f66a6842 100644 --- a/src/apps/AppBroadcast/LiveBroadcast.vue +++ b/src/apps/AppBroadcast/LiveBroadcast.vue @@ -157,6 +157,7 @@ }, onLongtap () { + this.time = 60 if (!this.equipmentList.length) { return this.$u.toast('请选择播发设备') } @@ -174,7 +175,6 @@ }, record () { - this.time = 60 this.recorder = Recorder({ type: 'mp3', sampleRate: 16000, @@ -191,11 +191,13 @@ }, timing () { - this.time = this.time - 1 - if (this.time === 0) { this.stop() + + return false } + this.time = this.time - 1 + this.timingTimeout = setTimeout(() => { this.timing() }, 1000) @@ -275,7 +277,6 @@ this.isShow = false }) - this.time = 60 console.log(blob, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms') }, msg => { console.log('录音失败:' + msg)