66 lines
1.6 KiB
TypeScript
66 lines
1.6 KiB
TypeScript
export class TeamService {
|
|
/**
|
|
* 获取我的队伍
|
|
* GET /Team/GetMyTeam
|
|
*/
|
|
static async GetMyTeam() {
|
|
return await ApiService.Request("get", "/Team/GetMyTeam");
|
|
}
|
|
|
|
/**
|
|
* 创建队伍
|
|
* GET /Team/CreateTeam
|
|
*/
|
|
static async CreateTeam(type: number, par: string) {
|
|
return await ApiService.Request("get", "/Team/CreateTeam", { type, par });
|
|
}
|
|
|
|
/**
|
|
* 加入队伍
|
|
* GET /Team/JoinTeam
|
|
*/
|
|
static async JoinTeam(teamId: string) {
|
|
return await ApiService.Request("get", "/Team/JoinTeam", { teamId });
|
|
}
|
|
|
|
/**
|
|
* 获取队伍信息
|
|
* GET /Team/GetTeamInfo
|
|
*/
|
|
static async GetTeamInfo(teamId: string) {
|
|
return await ApiService.Request("get", "/Team/GetTeamInfo", { teamId });
|
|
}
|
|
|
|
/**
|
|
* 退出队伍
|
|
* GET /Team/ExitTeam
|
|
*/
|
|
static async ExitTeam() {
|
|
return await ApiService.Request("get", "/Team/ExitTeam");
|
|
}
|
|
|
|
/**
|
|
* 修改队名
|
|
* POST /Team/UpdateTeamName
|
|
* @param name body
|
|
*/
|
|
static async UpdateTeamName(name: string) {
|
|
return await ApiService.Request("post", "/Team/UpdateTeamName", { name });
|
|
}
|
|
|
|
/**
|
|
* 踢出成员
|
|
* GET /Team/RemoveUser
|
|
*/
|
|
static async RemoveUser(user: string) {
|
|
return await ApiService.Request("get", "/Team/RemoveUser", { user });
|
|
}
|
|
|
|
/**
|
|
* 获取队伍列表
|
|
* GET /Team/GetTeamData
|
|
*/
|
|
static async GetTeamData(type: number, page: number) {
|
|
return await ApiService.Request("get", "/Team/GetTeamData", { type, page });
|
|
}
|
|
} |