From 422382a73276177699649c81689b542daba385e6 Mon Sep 17 00:00:00 2001 From: tangchengming <445785772@qq.com> Date: Thu, 27 Feb 2025 16:37:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MediationRoom.vue | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/pages/mediation-page/components/MediationRoom.vue b/src/pages/mediation-page/components/MediationRoom.vue index 04ea8c1..9c5a13d 100644 --- a/src/pages/mediation-page/components/MediationRoom.vue +++ b/src/pages/mediation-page/components/MediationRoom.vue @@ -488,7 +488,6 @@ export default { }, methods: { handleBeforeUnload(event) { - console.log(this.sessionId,'this.sessionId') // 刷新及离开挂断电话 if(this.calling){ window.tccc.Call.hungUp({sessionId: this.sessionId}) @@ -600,26 +599,20 @@ export default { // } // }) }, - handleBack() { - if(this.timerInterval) { //如果定时器还在运行 或者直接关闭,不用判断 - clearInterval(this.timerInterval); //关闭 - } - if (this.videoCallInterval) { - clearInterval(this.videoCallInterval) - } - this.handleBeforeUnload() - setTimeout(() => { - if(this.timerInterval) { //如果定时器还在运行 或者直接关闭,不用判断 - clearInterval(this.timerInterval); //关闭 - } - if (this.videoCallInterval) { - clearInterval(this.videoCallInterval) - } - if(this.calling){ - window.tccc.Call.hungUp({sessionId: this.sessionId}) - } + async handleBack() { + try { + if(this.timerInterval) { //如果定时器还在运行 或者直接关闭,不用判断 + clearInterval(this.timerInterval); //关闭 + } + if (this.videoCallInterval) { + clearInterval(this.videoCallInterval) + } + if(this.calling){ + let res = await window.tccc.Call.hungUp({sessionId: this.sessionId}) + } this.$router.push('/mediation-management') - }, 500); + } catch (err) {} + // this.$route.query.sourcePage == 'mediationManagement' // this.$router.push('/mediation-management') },