From 2873676a7cf878fb94668e65f2a53e99240b8e8c Mon Sep 17 00:00:00 2001 From: tangchengming <445785772@qq.com> Date: Thu, 27 Feb 2025 16:32:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=80=E5=87=BA?= =?UTF-8?q?=E8=B0=83=E8=A7=A3=E5=AE=A4=E5=9B=9E=E5=88=B0=E8=B0=83=E8=A7=A3?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=99=BA=E8=83=BD=E5=A4=96=E5=91=BC?= =?UTF-8?q?=E4=BB=8D=E7=84=B6=E5=9C=A8=E8=87=AA=E5=8A=A8=E6=8B=A8=E6=89=93?= =?UTF-8?q?=E5=85=B6=E4=BD=99=E6=A1=88=E4=BB=B6=E5=BD=93=E4=BA=8B=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mediation-page/components/MediationRoom.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/pages/mediation-page/components/MediationRoom.vue b/src/pages/mediation-page/components/MediationRoom.vue index 3fee3bb..2b770ca 100644 --- a/src/pages/mediation-page/components/MediationRoom.vue +++ b/src/pages/mediation-page/components/MediationRoom.vue @@ -481,14 +481,15 @@ export default { if (this.videoCallInterval) { clearInterval(this.videoCallInterval) } + if(this.calling){ + window.tccc.Call.hungUp({sessionId: this.sessionId}) + } window.removeEventListener('beforeunload', this.handleBeforeUnload); - }, methods: { handleBeforeUnload(event) { // 刷新及离开挂断电话 - if(this.sessionId !='') - { + if(this.calling){ window.tccc.Call.hungUp({sessionId: this.sessionId}) } }, @@ -600,6 +601,15 @@ export default { }, handleBack() { // this.$route.query.sourcePage == 'mediationManagement' + if(this.timerInterval) { //如果定时器还在运行 或者直接关闭,不用判断 + clearInterval(this.timerInterval); //关闭 + } + if (this.videoCallInterval) { + clearInterval(this.videoCallInterval) + } + if(this.calling){ + window.tccc.Call.hungUp({sessionId: this.sessionId}) + } this.$router.push('/mediation-management') }, // 获取调解记录 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 2/3] =?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') }, From 1eebd5a869e3f96c0cdfa5f047fc0d8ca037cad6 Mon Sep 17 00:00:00 2001 From: tangchengming <445785772@qq.com> Date: Thu, 27 Feb 2025 16:40:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mediation-page/components/MediationRoom.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/mediation-page/components/MediationRoom.vue b/src/pages/mediation-page/components/MediationRoom.vue index 9c5a13d..e0bfba8 100644 --- a/src/pages/mediation-page/components/MediationRoom.vue +++ b/src/pages/mediation-page/components/MediationRoom.vue @@ -609,10 +609,12 @@ export default { } if(this.calling){ let res = await window.tccc.Call.hungUp({sessionId: this.sessionId}) + console.log('挂断电话', res) + this.$router.push('/mediation-management') + } else { + this.$router.push('/mediation-management') } - this.$router.push('/mediation-management') } catch (err) {} - // this.$route.query.sourcePage == 'mediationManagement' // this.$router.push('/mediation-management') },