From 075f13e2f8c792af6d4f2afdc4832e9fe34957f7 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 27 Feb 2026 17:02:50 +0800
Subject: [PATCH] feat:关闭弹框

---
 applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue b/applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue
index 9387b7c..d55afc5 100644
--- a/applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue
+++ b/applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue
@@ -448,9 +448,7 @@
 	send('accept', incomingFrom, null)
 	log('✅ 已点击接听,发送 accept 给', incomingFrom)
 
-	// 停止铃声
-// 	const transmitData = { data: { type: 'stopVoice' } }
-// uni.postMessage(transmitData)
+
 	state.value = 'calling'
 
 	// 如果 offer 已经提前到达(我们暂存了),立刻 answer
@@ -458,6 +456,9 @@
 		answerOffer(lastOfferSdp, incomingFrom)
 		lastOfferSdp = null
 	}
+	// 停止
+	const transmitData = { data: { sign:'closeBox' } }
+	uni.postMessage(transmitData)
 }
 
 function rejectCall() {
@@ -466,11 +467,8 @@
 	// 你后端没有 reject,用 busy 表示拒绝/不可接听
 	send('busy', incomingFrom, null)
 	log('❌ 已拒绝来电,发送 busy 给', incomingFrom)
-	const transmitData = { data: { type: 'hangupVoice' } }
+	const transmitData = { data: { type: 'hangupVoice',sign:'closeBox'  } }
 uni.postMessage(transmitData)
-	// 停止铃声
-// 	const transmitData = { data: { type: 'stopVoice' } }
-// uni.postMessage(transmitData)
 
 	incomingFrom = null
 	acceptedByMe = false
@@ -579,7 +577,8 @@
 		// 对方挂断:显示提示,延迟10秒跳转
 		callEnded.value = true
 		endMessage.value = '对方已挂断'
-
+		const transmitData = { data: { type: 'hangupVoice',sign:'closeBox'  } }
+		uni.postMessage(transmitData)
 		// 延迟5秒后跳转页面
 		endTimer.value = setTimeout(() => {
 			// 返回上一页(uni-app的语音通话列表页面)
@@ -588,11 +587,10 @@
 			} else {
 				log('❌ uni对象不存在,无法返回上一页')
 			}
-			const transmitData = { data: { type: 'hangupVoice' } }
-			uni.postMessage(transmitData)
+
 			// 重置通话结束状态
 			callEnded.value = false
-		}, 3000)
+		}, 2000)
 	}
 }
 

--
Gitblit v1.9.3