From 98c481b25a0b307d35073f4ef23b8903c656a583 Mon Sep 17 00:00:00 2001 From: duoaohui <928970622@qq.com> Date: Sat, 6 Jun 2026 12:49:31 +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 | 39 +++++++++------------ 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/frontend/src/pages/cloud-law/video-call.vue b/frontend/src/pages/cloud-law/video-call.vue index a91f82d..018ca96 100644 --- a/frontend/src/pages/cloud-law/video-call.vue +++ b/frontend/src/pages/cloud-law/video-call.vue @@ -528,28 +528,23 @@ const navigateMiniProgramToReturnUrl = (returnUrl) => { const mp = getMiniProgram() if (!mp) return false const url = String(returnUrl || '').trim() - if (url) { - const attempts = [ - () => mp.reLaunch && mp.reLaunch({ url }), - () => mp.redirectTo && mp.redirectTo({ url }), - () => mp.navigateTo && mp.navigateTo({ url }) - ] - for (let i = 0; i < attempts.length; i++) { - try { - attempts[i]() - return true - } catch (e) { - console.warn('[CloudLawVideoCall] miniProgram navigate failed', e) - } - } + // 拿不到咨询详情地址时返回 false:交给 URL 桥接让原生页用本地 consultId 跳转, + // 切勿 navigateBack——那会退出整个视频页且误标记"已跳转",导致停不到咨询详情。 + if (!url) { + return false } - try { - if (typeof mp.navigateBack === 'function') { - mp.navigateBack({ delta: 1 }) + const attempts = [ + () => mp.reLaunch && mp.reLaunch({ url }), + () => mp.redirectTo && mp.redirectTo({ url }), + () => mp.navigateTo && mp.navigateTo({ url }) + ] + for (let i = 0; i < attempts.length; i++) { + try { + attempts[i]() return true + } catch (e) { + console.warn('[CloudLawVideoCall] miniProgram navigate failed', e) } - } catch (e) { - console.warn('[CloudLawVideoCall] miniProgram navigateBack failed', e) } return false } @@ -1051,10 +1046,8 @@ const hangup = async () => { // 挂断流程完成后再通知小程序:避免提前 reload web-view 中断 endMeeting notifyMiniProgramCallEndedOnce() setTimeout(() => { - if (!miniProgramRedirected) { - goToConsultDetail() - } - // 跳转失败时再用 URL 桥接触发原生页 @load 兜底 + // web-view 内(经 SSO 重定向)常拿不到 consultId 而无法直跳, + // 此时用 URL 桥接触发原生页 @load,由原生页用本地 consultId 跳转咨询详情。 if (!miniProgramRedirected) { notifyNativeMiniProgramHangup() }