运营数据
This commit is contained in:
@@ -505,6 +505,10 @@ const buildMiniProgramReturnUrl = () => {
|
|||||||
if (!consultId.value) {
|
if (!consultId.value) {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
try {
|
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') || ''
|
const cached = window.sessionStorage.getItem('echo_cloud_law_return_url') || ''
|
||||||
if (cached) return decodeRepeated(cached)
|
if (cached) return decodeRepeated(cached)
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
@@ -1046,7 +1050,15 @@ const hangup = async () => {
|
|||||||
} finally {
|
} finally {
|
||||||
ended.value = true
|
ended.value = true
|
||||||
leaving.value = false
|
leaving.value = false
|
||||||
|
// 用户端:优先尝试跳转小程序咨询详情;失败则依赖小程序页轮询 /end 状态兜底
|
||||||
notifyMiniProgramCallEndedOnce()
|
notifyMiniProgramCallEndedOnce()
|
||||||
|
if (!isLawRole.value) {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (ended.value && !miniProgramRedirected) {
|
||||||
|
goToConsultDetail()
|
||||||
|
}
|
||||||
|
}, 600)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1125,13 +1137,14 @@ onMounted(() => {
|
|||||||
|
|
||||||
watch(ended, (value) => {
|
watch(ended, (value) => {
|
||||||
if (!value || isLawRole.value) return
|
if (!value || isLawRole.value) return
|
||||||
const returnUrl = buildMiniProgramReturnUrl()
|
|
||||||
if (!returnUrl) return
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (ended.value && !miniProgramRedirected) {
|
if (ended.value && !miniProgramRedirected) {
|
||||||
notifyMiniProgramCallEndedOnce()
|
notifyMiniProgramCallEndedOnce()
|
||||||
|
if (!miniProgramRedirected) {
|
||||||
|
goToConsultDetail()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 1500)
|
}, 800)
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user