会议结束
This commit is contained in:
@@ -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)}`
|
||||||
|
|||||||
@@ -235,25 +235,41 @@ 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)
|
||||||
|
|
||||||
// 清理 Jitsi API
|
try {
|
||||||
if (jitsiApi) {
|
// 调用后端接口更新会议结束时间
|
||||||
jitsiApi.dispose()
|
if (meetingId.value) {
|
||||||
jitsiApi = null
|
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
|
||||||
|
if (jitsiApi) {
|
||||||
|
jitsiApi.dispose()
|
||||||
|
jitsiApi = null
|
||||||
|
}
|
||||||
|
|
||||||
// 如果有roomId,返回到对应的聊天室
|
// 如果有roomId,返回到对应的聊天室
|
||||||
if (roomId.value) {
|
if (roomId.value) {
|
||||||
router.push(`/chatRoom?roomId=${roomId.value}`)
|
router.push(`/chatRoom?roomId=${roomId.value}`)
|
||||||
} else {
|
|
||||||
// 没有roomId,尝试返回上一页或关闭窗口
|
|
||||||
if (window.history.length > 1) {
|
|
||||||
router.back()
|
|
||||||
} else {
|
} else {
|
||||||
window.close()
|
// 没有roomId,尝试返回上一页或关闭窗口
|
||||||
|
if (window.history.length > 1) {
|
||||||
|
router.back()
|
||||||
|
} else {
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user