43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
|
|
import { request } from '../request'
|
||
|
|
|
||
|
|
/** 房间相关接口 */
|
||
|
|
export function fetchGetRoomList() {
|
||
|
|
return request<App.Service.Response<Api.Competition.Room[]>>({
|
||
|
|
url: '/Base/ActivityMain/GetActivity_RoomList',
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// 现在服务端把活动新建弄成了三个接口:
|
||
|
|
// 1. 创建活动
|
||
|
|
// 2. 创建活动房间
|
||
|
|
// 3. 创建活动队伍
|
||
|
|
// 但是业务要求最后一步创建
|
||
|
|
|
||
|
|
/** 创建活动基础信息 */
|
||
|
|
export function fetchCreateActivity(data: Api.Competition.CreateRoomRequest) {
|
||
|
|
return request<App.Service.Response<Api.Common.CommonResponse>>({
|
||
|
|
url: '/Base/ActivityMain/AddActivity',
|
||
|
|
method: 'post',
|
||
|
|
data,
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
/** 创建活动队伍 */
|
||
|
|
export function fetchCreateTeamList(data: Api.Competition.CreateTeamListRequest[]) {
|
||
|
|
return request<App.Service.Response<Api.Common.CommonResponse>>({
|
||
|
|
url: '/Base/ActivityMain/AddActivity_TeamList',
|
||
|
|
method: 'post',
|
||
|
|
data,
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
/** 创建活动题目 */
|
||
|
|
export function fetchCreateQuestion(data: Api.Competition.CreateQuestionRequest[]) {
|
||
|
|
return request<App.Service.Response<Api.Common.CommonResponse>>({
|
||
|
|
url: '/Base/ActivityMain/AddOrUpdateActivity_Question',
|
||
|
|
method: 'post',
|
||
|
|
data,
|
||
|
|
})
|
||
|
|
}
|