会议结束

This commit is contained in:
2025-12-27 17:57:08 +08:00
parent 0fb7a4ffb2
commit 50df8495c7
2 changed files with 33 additions and 17 deletions

View File

@@ -185,7 +185,7 @@ import { Client } from '@stomp/stompjs'
// WebSocket配置 (通过Nginx代理访问网关再到workcase服务) // WebSocket配置 (通过Nginx代理访问网关再到workcase服务)
// SockJS URL (http://) // SockJS URL (http://)
const getWsUrl = () => { const getWsUrl = () => {
const token = localStorage.getItem('token') || '' const token = JSON.parse(localStorage.getItem('token')).value || ''
const protocol = window.location.protocol const protocol = window.location.protocol
const host = window.location.host const host = window.location.host
return `${protocol}//${host}/api/urban-lifeline/workcase/ws/chat-sockjs?token=${encodeURIComponent(token)}` return `${protocol}//${host}/api/urban-lifeline/workcase/ws/chat-sockjs?token=${encodeURIComponent(token)}`

View File

@@ -235,10 +235,25 @@ const joinMeeting = async () => {
} }
} }
// 处理离开会议(不结束 // 处理离开会议(更新会议结束时间
const handleLeaveMeeting = () => { const handleLeaveMeeting = async () => {
console.log('[JitsiMeetingView] 处理离开会议,返回聊天室:', roomId.value) // 强制更新: 修改时间 2025-12-27 09:45
console.log('[JitsiMeetingView] 处理离开会议meetingId:', meetingId.value, 'roomId:', roomId.value)
try {
// 调用后端接口更新会议结束时间
if (meetingId.value) {
console.log('[JitsiMeetingView] 调用结束会议API更新结束时间')
const result = await workcaseChatAPI.endVideoMeeting(meetingId.value)
if (result.success) {
console.log('[JitsiMeetingView] 会议结束时间已更新:', result.data)
} else {
console.warn('[JitsiMeetingView] 更新会议结束时间失败:', result.message)
}
}
} catch (err) {
console.error('[JitsiMeetingView] 更新会议结束时间异常:', err)
} finally {
// 清理 Jitsi API // 清理 Jitsi API
if (jitsiApi) { if (jitsiApi) {
jitsiApi.dispose() jitsiApi.dispose()
@@ -257,6 +272,7 @@ const handleLeaveMeeting = () => {
} }
} }
} }
}
// 处理结束会议 // 处理结束会议
const handleEndMeeting = async () => { const handleEndMeeting = async () => {