64 lines
1.8 KiB
JavaScript
64 lines
1.8 KiB
JavaScript
|
|
import request from '@/utils/request';
|
|
|
|
// 获取仿真成员列表(新版地图)
|
|
export function getSimulationMembersNew(group) {
|
|
return request({
|
|
url: `/simulation/${group}/members`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 发起会话 */
|
|
export function startConversition(group, data, sign) {
|
|
return request({
|
|
url: `/api/simulation/${group}/conversation?object=${sign}`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
/** 发送会话消息 */
|
|
export function sendSimulationConversition(group, conversationId, file) {
|
|
return request({
|
|
url: `/api/simulation/${group}/conversation/${conversationId}/chat`,
|
|
method: 'post',
|
|
data: file
|
|
});
|
|
}
|
|
/** 成员接收仿真会话邀请 */
|
|
export function acceptConversitionInvite(group, conversationId) {
|
|
return request({
|
|
url: `/api/simulation/${group}/conversation/${conversationId}/connect`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
/** 结束仿真会话 */
|
|
export function overSimulationConversition(group, conversationId) {
|
|
return request({
|
|
url: `/api/simulation/${group}/conversation/${conversationId}/over`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
/** 获取所有会话 */
|
|
export function getAllConversition(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/conversation/listAll`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 语音播完的接口 */
|
|
export function overConversationMessage(group, conversationMessageId) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/${group}/audio/over/${conversationMessageId}`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
/** 发送会话文字 */
|
|
export function sendConversationText (group, id, data) {
|
|
return request({
|
|
url: `/api/simulation/${group}/conversation/${id}/chat/text?`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|