From d6b8a0e1e1fca91a3b4caf12871eac5f5e37751b Mon Sep 17 00:00:00 2001 From: duoaohui <928970622@qq.com> Date: Sat, 6 Jun 2026 11:56:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=90=A5=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/meeting/room.vue | 17 +++++++++++++---- frontend/src/utils/cloudLawMiniProgram.js | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/meeting/room.vue b/frontend/src/pages/meeting/room.vue index e6bf94b..7674a66 100644 --- a/frontend/src/pages/meeting/room.vue +++ b/frontend/src/pages/meeting/room.vue @@ -236,7 +236,8 @@ import { isCloudLawEmbed, isCloudLawLawRole, minimizeCloudLawMeeting, - notifyCloudLawCallEnded + notifyCloudLawCallEnded, + getMiniProgram } from '@/utils/cloudLawMiniProgram' import { isCloudLawLawRoleInMeeting, @@ -875,13 +876,17 @@ const handleCloudLawConsultEnded = async (tip = '用户已退出咨询') => { try { if (cloudLawCallId.value) { await notifyCloudLawBackendEnd(cloudLawCallId.value, 'law', cloudLawApiBase.value) - notifyCloudLawParentCallEnded(cloudLawCallId.value) + if (isCloudLawPcIframe()) { + notifyCloudLawParentCallEnded(cloudLawCallId.value) + } else if (getMiniProgram()) { + notifyCloudLawCallEnded(cloudLawCallId.value) + } } if (meetingStore.isInMeeting) { await meetingStore.leave().catch(() => {}) } uni.showToast({ title: tip, icon: 'none' }) - if (!isCloudLawPcIframe()) { + if (!isCloudLawPcIframe() && !getMiniProgram()) { setTimeout(() => redirectHome(true), 800) } } finally { @@ -987,8 +992,12 @@ onMounted(() => { // 云律律师端(含 PC iframe):用户挂断后同步云律后端 + 通知父页面释放浮窗 if (isCloudLawLawRoleInMeeting(cloudLawRole.value) && cloudLawCallId.value) { notifyCloudLawBackendEnd(cloudLawCallId.value, 'law', cloudLawApiBase.value) - notifyCloudLawParentCallEnded(cloudLawCallId.value) if (isCloudLawPcIframe()) { + notifyCloudLawParentCallEnded(cloudLawCallId.value) + return + } + if (getMiniProgram()) { + notifyCloudLawCallEnded(cloudLawCallId.value) return } } diff --git a/frontend/src/utils/cloudLawMiniProgram.js b/frontend/src/utils/cloudLawMiniProgram.js index cd11612..aabdac4 100644 --- a/frontend/src/utils/cloudLawMiniProgram.js +++ b/frontend/src/utils/cloudLawMiniProgram.js @@ -54,7 +54,7 @@ export function minimizeCloudLawMeeting(callId = '') { /** 会议真正结束:通知小程序释放占用 */ export function notifyCloudLawCallEnded(callId = '') { const mp = getMiniProgram() - if (!isCloudLawEmbed() || !mp) return false + if (!mp) return false try { if (typeof mp.postMessage === 'function') { mp.postMessage({