feat: detail static

This commit is contained in:
2025-08-26 00:02:42 +08:00
parent 1e158e111c
commit f184624c33
15 changed files with 1291 additions and 29 deletions

View File

@@ -0,0 +1,41 @@
import httpService from './httpService'
import type { ApiResponse } from './httpService'
// 用户接口
export interface GameDetail {
id: number,
title: string,
venue_id: number,
creator_id: number,
game_date: string,
start_time: string,
end_time: string,
max_participants: number,
current_participants: number,
ntrp_level: string,
play_style: string,
description: string,
status: string,
created_at: string,
updated_at: string,
}
// 响应接口
export interface Response {
code: string
message: string
data: GameDetail
}
// 发布球局类
class GameDetailService {
// 用户登录
async getDetail(id: number): Promise<ApiResponse<Response>> {
return httpService.post('/games/detail', { id }, {
showLoading: true,
})
}
}
// 导出认证服务实例
export default new GameDetailService()