运营数据
This commit is contained in:
@@ -162,7 +162,7 @@ import {
|
|||||||
MEETING_ENDED_REASON_LABEL
|
MEETING_ENDED_REASON_LABEL
|
||||||
} from '@/constants/meeting'
|
} from '@/constants/meeting'
|
||||||
import VideoTile from '@/components/meeting/VideoTile.vue'
|
import VideoTile from '@/components/meeting/VideoTile.vue'
|
||||||
import { minimizeCloudLawMeeting } from '@/utils/cloudLawMiniProgram'
|
import { minimizeCloudLawMeeting, notifyCloudLawCallEnded, getMiniProgram } from '@/utils/cloudLawMiniProgram'
|
||||||
import {
|
import {
|
||||||
notifyCloudLawBackendEnd,
|
notifyCloudLawBackendEnd,
|
||||||
notifyCloudLawParentCallEnded,
|
notifyCloudLawParentCallEnded,
|
||||||
@@ -1018,10 +1018,6 @@ const hangup = async () => {
|
|||||||
userInitiatedHangup.value = true
|
userInitiatedHangup.value = true
|
||||||
leaving.value = true
|
leaving.value = true
|
||||||
stopCommandPolling()
|
stopCommandPolling()
|
||||||
if (!isLawRole.value) {
|
|
||||||
// 优先触发小程序原生 /end(web-view 跨域直连云律 API 不可靠)
|
|
||||||
notifyNativeMiniProgramHangup()
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
// 先通知云律后端结束本次通话:
|
// 先通知云律后端结束本次通话:
|
||||||
// - 用户端:/api/applet/voiceConnection/{callId}/end
|
// - 用户端:/api/applet/voiceConnection/{callId}/end
|
||||||
@@ -1055,14 +1051,18 @@ const hangup = async () => {
|
|||||||
} finally {
|
} finally {
|
||||||
ended.value = true
|
ended.value = true
|
||||||
leaving.value = false
|
leaving.value = false
|
||||||
// 用户端:优先尝试跳转小程序咨询详情;失败则依赖小程序页轮询 /end 状态兜底
|
|
||||||
notifyMiniProgramCallEndedOnce()
|
|
||||||
if (!isLawRole.value) {
|
if (!isLawRole.value) {
|
||||||
|
// 挂断流程完成后再通知小程序:避免提前 reload web-view 中断 endMeeting
|
||||||
|
notifyMiniProgramCallEndedOnce()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (ended.value && !miniProgramRedirected) {
|
if (!miniProgramRedirected) {
|
||||||
goToConsultDetail()
|
goToConsultDetail()
|
||||||
}
|
}
|
||||||
}, 600)
|
// 跳转失败时再用 URL 桥接触发原生页 @load 兜底
|
||||||
|
if (!miniProgramRedirected) {
|
||||||
|
notifyNativeMiniProgramHangup()
|
||||||
|
}
|
||||||
|
}, 400)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1130,8 +1130,16 @@ onMounted(() => {
|
|||||||
// 对方挂断或会议结束时,通知云律后端 + 父页面(PC 律师浮窗)+ 小程序
|
// 对方挂断或会议结束时,通知云律后端 + 父页面(PC 律师浮窗)+ 小程序
|
||||||
notifyCloudLawEnd().finally(() => {
|
notifyCloudLawEnd().finally(() => {
|
||||||
if (isLawRole.value) {
|
if (isLawRole.value) {
|
||||||
|
if (isCloudLawPcIframe()) {
|
||||||
notifyCloudLawParentCallEnded(callId.value)
|
notifyCloudLawParentCallEnded(callId.value)
|
||||||
if (isCloudLawPcIframe()) return
|
return
|
||||||
|
}
|
||||||
|
if (getMiniProgram()) {
|
||||||
|
notifyCloudLawCallEnded(callId.value)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
notifyCloudLawParentCallEnded(callId.value)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
notifyMiniProgramCallEndedOnce()
|
notifyMiniProgramCallEndedOnce()
|
||||||
scheduleEndedRedirect()
|
scheduleEndedRedirect()
|
||||||
|
|||||||
Reference in New Issue
Block a user