🔧 修复:进入会议时自动加入

变更:
- joinMeeting 先获取会议信息
- 传递 invite_code 到后端
- 加入后刷新参会者列表
This commit is contained in:
2026-04-04 21:10:18 +08:00
parent 5cb47e9b3e
commit f74babe5f5
7 changed files with 8 additions and 1 deletions

View File

@@ -1 +1 @@
[{"/home/node/.openclaw/workspace/flying-hero/projects/meeting-room/frontend/src/index.js":"1","/home/node/.openclaw/workspace/flying-hero/projects/meeting-room/frontend/src/App.js":"2"},{"size":232,"mtime":1775265162529,"results":"3","hashOfConfig":"4"},{"size":19499,"mtime":1775294803463,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","suppressedMessages":"8","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1sir4jg",{"filePath":"9","messages":"10","suppressedMessages":"11","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/node/.openclaw/workspace/flying-hero/projects/meeting-room/frontend/src/index.js",[],[],"/home/node/.openclaw/workspace/flying-hero/projects/meeting-room/frontend/src/App.js",[],[]] [{"/home/node/.openclaw/workspace/flying-hero/projects/meeting-room/frontend/src/index.js":"1","/home/node/.openclaw/workspace/flying-hero/projects/meeting-room/frontend/src/App.js":"2"},{"size":232,"mtime":1775265162529,"results":"3","hashOfConfig":"4"},{"size":20129,"mtime":1775308176625,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","suppressedMessages":"8","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1sir4jg",{"filePath":"9","messages":"10","suppressedMessages":"11","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/node/.openclaw/workspace/flying-hero/projects/meeting-room/frontend/src/index.js",[],[],"/home/node/.openclaw/workspace/flying-hero/projects/meeting-room/frontend/src/App.js",[],[]]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -270,10 +270,17 @@ function MeetingRoom() {
const joinMeeting = async () => { const joinMeeting = async () => {
try { try {
// 先获取会议信息
if (!meeting) {
const res = await axios.get(`${API_BASE}/meetings/${id}/`);
setMeeting(res.data);
}
// 尝试加入会议(如果还没加入) // 尝试加入会议(如果还没加入)
await axios.post(`${API_BASE}/meetings/${id}/join/`, { await axios.post(`${API_BASE}/meetings/${id}/join/`, {
invite_code: meeting?.invite_code invite_code: meeting?.invite_code
}); });
// 刷新参会者列表
fetchParticipants();
} catch (error) { } catch (error) {
// 可能已经加入了,忽略错误 // 可能已经加入了,忽略错误
console.log('加入会议:', error?.response?.data?.error || '已加入'); console.log('加入会议:', error?.response?.data?.error || '已加入');