From 9e9573a35d3a10dfb90a6d5384619186b19c21b9 Mon Sep 17 00:00:00 2001 From: duoaohui <928970622@qq.com> Date: Sat, 6 Jun 2026 11:22:47 +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/cloud-law/video-call.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/cloud-law/video-call.vue b/frontend/src/pages/cloud-law/video-call.vue index 9127037..35117bf 100644 --- a/frontend/src/pages/cloud-law/video-call.vue +++ b/frontend/src/pages/cloud-law/video-call.vue @@ -505,6 +505,10 @@ const buildMiniProgramReturnUrl = () => { if (!consultId.value) { // #ifdef H5 try { + const cachedConsultId = window.sessionStorage.getItem('echo_cloud_law_consult_id') || '' + if (cachedConsultId) { + return `/pages_work/ai_consult/ai_consult?id=${encodeURIComponent(cachedConsultId)}&mode=detail&from=videoCall` + } const cached = window.sessionStorage.getItem('echo_cloud_law_return_url') || '' if (cached) return decodeRepeated(cached) } catch (e) {} @@ -1046,7 +1050,15 @@ const hangup = async () => { } finally { ended.value = true leaving.value = false + // 用户端:优先尝试跳转小程序咨询详情;失败则依赖小程序页轮询 /end 状态兜底 notifyMiniProgramCallEndedOnce() + if (!isLawRole.value) { + setTimeout(() => { + if (ended.value && !miniProgramRedirected) { + goToConsultDetail() + } + }, 600) + } } } @@ -1125,13 +1137,14 @@ onMounted(() => { watch(ended, (value) => { if (!value || isLawRole.value) return - const returnUrl = buildMiniProgramReturnUrl() - if (!returnUrl) return setTimeout(() => { if (ended.value && !miniProgramRedirected) { notifyMiniProgramCallEndedOnce() + if (!miniProgramRedirected) { + goToConsultDetail() + } } - }, 1500) + }, 800) }) onBeforeUnmount(() => {