From e27da0b58fe38d7455eadba56b45fcf7ee6c78c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=91=AB?= Date: Wed, 30 Dec 2020 09:39:26 +0800 Subject: [PATCH] =?UTF-8?q?realTimeMonitoring=E9=A1=B5=E9=9D=A2beforeRoute?= =?UTF-8?q?Leave=E8=B7=AF=E7=94=B1=E5=AE=88=E5=8D=AB=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B8=85=E7=A9=BAvxgplayer=E5=AE=9E=E4=BE=8B=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=88=E5=85=88=E6=B8=85=E7=A9=BA=E5=90=8E=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/realTimeMonitoring/index.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/views/realTimeMonitoring/index.vue b/src/views/realTimeMonitoring/index.vue index 57684af..7c53a01 100644 --- a/src/views/realTimeMonitoring/index.vue +++ b/src/views/realTimeMonitoring/index.vue @@ -86,7 +86,21 @@ export default { // this.getSdVideos() }, destroyed(){ - console.log('2222222') + + }, + beforeRouteLeave(to,form,next){ + if(window.vxgplayer){ + this.realTimeListData.forEach(function (item) { + console.log(item) + item.cameras.forEach(function (item) { + window.vxgplayer('video'+item.id).dispose(); + }) + next(true) + }) + }else { + next(true) + } + }, methods: { // 展开收起