feat: 球局详情管理 未完
This commit is contained in:
@@ -92,10 +92,8 @@ export interface UpdateLocationRes {
|
||||
city: string;
|
||||
district: string;
|
||||
}
|
||||
|
||||
// 发布球局类
|
||||
class GameDetailService {
|
||||
// 用户登录
|
||||
// 查询球局详情
|
||||
async getDetail(id: number): Promise<ApiResponse<GameData>> {
|
||||
return httpService.post(
|
||||
"/games/detail",
|
||||
@@ -114,6 +112,27 @@ class GameDetailService {
|
||||
showLoading: true,
|
||||
});
|
||||
}
|
||||
|
||||
// 组织者加入球局
|
||||
async organizerJoin(game_id: number): Promise<ApiResponse<any>> {
|
||||
return httpService.post("/games/organizer_join", { game_id }, {
|
||||
showLoading: true,
|
||||
});
|
||||
}
|
||||
|
||||
// 组织者退出球局
|
||||
async organizerQuit(req: { game_id: number, quit_reason: string }): Promise<ApiResponse<any>> {
|
||||
return httpService.post("/games/organizer_quit", req, {
|
||||
showLoading: true,
|
||||
});
|
||||
}
|
||||
|
||||
// 组织者解散球局
|
||||
async disbandGame(req: { game_id: number, settle_reason: string }): Promise<ApiResponse<any>> {
|
||||
return httpService.post("/games/settle_game", req, {
|
||||
showLoading: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 导出认证服务实例
|
||||
|
||||
Reference in New Issue
Block a user