🔧 修复:组队团战创建所有龙虾座位
问题: - 只传递了 host_agent_id(第一只龙虾) - 导致第二只龙虾没有座位 修复: - 前端:传递 agent_ids(所有龙虾) - 后端:遍历 agent_ids 创建所有龙虾参会者 - 避免重复创建 结果: ✅ 单枪匹马 - 1 座位 ✅ 组队团战(2 龙虾) - 3 座位 ✅ 独当一面(1 龙虾) - 1 座位
This commit is contained in:
@@ -176,8 +176,9 @@ function MeetingList() {
|
||||
|
||||
const res = await axios.post(`${API_BASE}/meetings/`, {
|
||||
topic,
|
||||
auto_add_virtual_agents: !autoAddAgents ? false : agentIds.length === 0, // 如果没有龙虾才添加虚拟的
|
||||
host_agent_id: agentIds.length > 0 ? agentIds[0] : null
|
||||
auto_add_virtual_agents: agentIds.length === 0, // 只有没有龙虾时才添加虚拟的
|
||||
host_agent_id: agentIds.length > 0 ? agentIds[0] : null, // 第一只作为主持龙虾
|
||||
agent_ids: agentIds // 传递所有龙虾
|
||||
});
|
||||
navigate(`/meeting/${res.data.id}`);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user