电话咨询

This commit is contained in:
duoaohui
2026-06-04 11:51:24 +08:00
parent 96fca438f4
commit 6727259e8b
2 changed files with 78 additions and 9 deletions

View File

@@ -20,9 +20,9 @@
<!-- 顶部品牌区域 -->
<view class="brand-section">
<view class="logo-box">
<image class="brand-logo" src="/static/shangsong.png" mode="aspectFit" />
<text class="logo-letter">E</text>
</view>
<text class="brand-name">赏讼视频会议系统</text>
<text class="brand-name">EchoChat</text>
<text class="brand-slogan">连接无限沟通无界</text>
</view>
@@ -81,11 +81,14 @@
</view>
<view class="oauth-buttons">
<button class="oauth-btn oauth-wechat" :disabled="oauthLoading" @tap="oauthLogin('wechat')">
<image class="oauth-icon" src="/static/weixin.png" mode="aspectFit" />
<view class="oauth-icon oauth-icon-wechat">
<view class="wechat-bubble wechat-bubble-large"></view>
<view class="wechat-bubble wechat-bubble-small"></view>
</view>
<text>微信登录</text>
</button>
<button class="oauth-btn oauth-qq" :disabled="oauthLoading" @tap="oauthLogin('qq')">
<image class="oauth-icon" src="/static/qq.png" mode="aspectFit" />
<text class="oauth-icon oauth-icon-qq">Q</text>
<text>QQ登录</text>
</button>
</view>
@@ -278,14 +281,17 @@ export default {
.logo-box {
width: 112rpx;
height: 112rpx;
border-radius: 24rpx;
background-color: #2563EB;
display: flex;
align-items: center;
justify-content: center;
}
.brand-logo {
width: 112rpx;
height: 112rpx;
.logo-letter {
font-size: 52rpx;
font-weight: 700;
color: #FFFFFF;
}
.brand-name {
@@ -455,8 +461,46 @@ export default {
}
.oauth-icon {
width: 52rpx;
height: 52rpx;
width: 36rpx;
height: 36rpx;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.94);
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
font-weight: 700;
line-height: 36rpx;
}
.oauth-icon-wechat {
position: relative;
color: #07C160;
}
.oauth-icon-qq {
color: #12B7F5;
}
.wechat-bubble {
position: absolute;
border-radius: 50%;
background-color: #07C160;
}
.wechat-bubble-large {
width: 18rpx;
height: 14rpx;
left: 8rpx;
top: 10rpx;
}
.wechat-bubble-small {
width: 14rpx;
height: 11rpx;
right: 7rpx;
bottom: 9rpx;
border: 2rpx solid #FFFFFF;
}
/* ---- 底部链接 ---- */

View File

@@ -7,6 +7,7 @@
<text class="entry-title">{{ entryTitle }}</text>
<text class="entry-desc">{{ joinError || stateText }}</text>
<button v-if="joinError" class="retry-btn" @click="joinMeeting">重新进入</button>
<button v-else-if="ended && buildMiniProgramReturnUrl()" class="retry-btn" @click="goToConsultDetail">查看咨询详情</button>
</view>
<view v-else class="call-shell" :class="{ 'voice-mode': isVoiceMode }">
@@ -425,6 +426,8 @@ const buildMiniProgramReturnUrl = () => {
return `/pages_work/ai_consult/ai_consult?id=${encodeURIComponent(consultId.value)}&mode=detail&from=videoCall`
}
let endedRedirectTimer = null
const notifyMiniProgramCallEnded = () => {
const payload = {
type: 'cloudLawCallEnded',
@@ -446,6 +449,18 @@ const notifyMiniProgramCallEnded = () => {
}
}
const scheduleEndedRedirect = () => {
if (endedRedirectTimer) return
endedRedirectTimer = setTimeout(() => {
endedRedirectTimer = null
notifyCloudLawEnd().finally(() => notifyMiniProgramCallEnded())
}, 1200)
}
const goToConsultDetail = () => {
notifyCloudLawEnd().finally(() => notifyMiniProgramCallEnded())
}
const pollCommandsOnce = async () => {
if (!callId.value || !meetingStore.isInMeeting || leaving.value || ended.value || commandPolling) return
commandPolling = true
@@ -827,6 +842,7 @@ const hangup = async () => {
ended.value = true
leaving.value = false
notifyMiniProgramCallEnded()
scheduleEndedRedirect()
}
}
@@ -855,11 +871,20 @@ onMounted(() => {
const label = MEETING_ENDED_REASON_LABEL?.[reason] || '视频咨询已结束'
uni.showToast({ title: label, icon: 'none' })
ended.value = true
// 对方挂断或会议结束时,通知小程序跳转到「我的咨询详情」
notifyCloudLawEnd().finally(() => {
notifyMiniProgramCallEnded()
scheduleEndedRedirect()
})
}
}, { immediate: true })
})
onBeforeUnmount(() => {
if (endedRedirectTimer) {
clearTimeout(endedRedirectTimer)
endedRedirectTimer = null
}
if (timerHandle) {
clearInterval(timerHandle)
timerHandle = null