合并代码

This commit is contained in:
筱野
2025-08-30 22:28:02 +08:00
143 changed files with 6369 additions and 2072 deletions

View File

@@ -30,6 +30,12 @@ export interface PublishBallData {
wechat_contact?: string // 微信联系
}
export interface createGameData extends PublishBallData {
status: string,
created_at: string,
updated_at: string,
}
// 响应接口
export interface Response {
code: string
@@ -37,7 +43,6 @@ export interface Response {
data: any
}
// 响应接口
export interface StadiumListResponse {
rows: Stadium[]
}
@@ -51,10 +56,61 @@ export interface Stadium {
latitude?: number
}
// export type SourceType = 'history' | 'preset'
export interface getPicturesReq {
pageOption: {
page: number,
pageSize: number,
},
seachOption: {
tag: string,
resource_type: string,
dateRange: string[],
},
}
export interface getPicturesRes {
code: number,
message: string,
data: {
rows: [
{
user_id: string,
resource_type: string,
file_name: string,
original_name: string,
file_path: string,
file_url: string,
file_size: number,
mime_type: string,
width: number,
height: number,
duration: number,
thumbnail_url: string,
is_public: string,
tags: string[],
description: string,
view_count: number,
download_count: number,
status: string,
last_modify_time: string,
}
],
count: number,
page: number,
pageSize: number,
totalPages: number,
}
}
function delay(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms))
}
// 发布球局类
class PublishService {
// 发布
async createPersonal(data: PublishBallData): Promise<ApiResponse<Response>> {
// 用户登录
async createPersonal(data: PublishBallData): Promise<ApiResponse<createGameData>> {
return httpService.post('/games/create', data, {
showLoading: true,
loadingText: '发布中...'
@@ -66,14 +122,21 @@ class PublishService {
return httpService.post('/venues/list', data, {
showLoading: false })
}
<<<<<<< HEAD
// 畅打发布
async create_play_pmoothly(data: PublishBallData): Promise<ApiResponse<Response>> {
return httpService.post('/games/create_play_pmoothly', data, {
showLoading: true,
loadingText: '发布中...'
=======
async getPictures(req: getPicturesReq): Promise<ApiResponse<getPicturesRes>> {
return httpService.post('/gallery/sys_img_list', req, {
showLoading: false,
showToast: false,
>>>>>>> d92419f3c5648a67d1b6857d66d6c92a4bece034
})
}
}
// 导出认证服务实例
export default new PublishService()
export default new PublishService()