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') }, // 获取调解记录