import request from '@/utils/request'; export function postDataBd(data) { return request({ url: `/api/audio/bd?group=${data.group}&conversationId=${data.conversationId}`, method: 'post', data: data.file }); } // 创建/获取会话id export function getConversation(data) { return request({ url: `/api/audio/conversation`, method: 'get', params: { group: data.group, userId: data.userId, code: data.code } }); } export function postDataXf(data) { return request({ url: `/api/audio/xf`, method: 'post', data: data }); } // 获取语音历史记录 export function getHistoryVoice(code) { return request({ url: `/api/audio/${code}/history`, method: 'get' }); } // 文字聊天 发送文字 export function chatWithText(data, group) { return request({ url: `/api/jointTraining/chatWithText?group=${group}`, method: 'post', data: { message: data } }); } // 文字聊天 发送文字 export function chatWithAudio(file, group) { return request({ url: `/api/jointTraining/chatWithAudio?group=${group}`, method: 'post', data: file }); } // 文字聊天 发送文字 export function getJoinTrainCode(data, group) { return request({ url: `/api/jointTraining/qrCode?group=${group}`, method: 'post', data: data }); } // 创建房间 export function postCreateRoom(data) { return request({ url: `/api/jointTraining/room`, method: 'post', data: data }); } // 检查房间存在 export function checkRoomExist(params) { return request({ url: `/api/simulationRoom`, method: 'get', params }); } // 获取房间详情 export function postRoomDetail(group) { return request({ url: `/api/jointTraining/room/${group}`, method: 'get' }); } // 销毁房间 export function deljointTrainRoom(group) { return request({ url: `/api/jointTraining/room`, method: 'delete', params: { group: group } }); } // 查询有权限房间列表 export function getjointTrainList() { return request({ url: `/api/jointTraining/room/list`, method: 'get' }); } // 加入房间 export function getjointTraining(group) { return request({ url: `/api/jointTraining/room/join`, method: 'put', params: { group: group } }); } // 设置人员角色 export function putUserRoles(data, group) { return request({ url: `/api/jointTraining/room/user/role?group=${group}`, method: 'put', data: data }); } // 设置人员角色 export function getJointTrainRoomUserList(group) { return request({ url: `/api/jointTraining/room/${group}/user/list`, method: 'get' }); } // 离开房间接口 export function putJointTrainingExit(group) { return request({ url: `/api/jointTraining/room/exit`, method: 'put', params: { group: group } }); } // 开始联合演练 export function startJointTraining(group) { return request({ url: `/api/jointTraining/room/simulation`, method: 'post', params: { group: group } }); } // 获取个人信息 export function getUserRoles(group) { return request({ url: `/api/jointTraining/room/user/role`, method: 'get', params: { group: group } }); } // 返回房间 export function putJointTrainingState() { return request({ url: `/api/jointTraining/room/back`, method: 'put' }); } // 踢出用户 export function putJointTrainingUserkicked(userId, group) { return request({ url: `/api/jointTraining/room/user`, method: 'put', params: { userId: userId, group: group } }); } // 管理员结束所有人的仿真 export function putJointTrainingSimulation(group) { return request({ url: `/api/jointTraining/room/simulation/all`, method: 'put', params: { group: group } }); } // 结束仿真返回房间 export function putJointTrainingSimulationUser(group) { return request({ url: `/api/jointTraining/room/simulation/user/exit`, method: 'put', params: { group: group } }); } // 进入仿真 export function putJointTrainingSimulationEntrance(group) { return request({ url: `/api/jointTraining/room/simulation/user/entrance`, method: 'put', params: { group: group } }); } /** * 权限获取(房间权限) */ export function getPermissionJoint(group) { return request({ url: '/api/jointTraining/qrCode', method: 'get', params: { group: group } }); }