列表接口

This commit is contained in:
juguohong
2025-08-30 13:40:25 +08:00
parent f0b02e832f
commit 1cb303b86d
4 changed files with 22 additions and 23 deletions

View File

@@ -1,4 +1,5 @@
import { TennisMatch } from "../store/listStore";
import httpService from "./httpService";
// 模拟网络延迟
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
@@ -91,14 +92,11 @@ export const getTennisMatches = async (params?: {
pageSize?: number;
location?: string;
skillLevel?: string;
}): Promise<TennisMatch[]> => {
}) => {
try {
// 生成动态数据
const matches = generateDynamicData();
return matches;
return httpService.post('/venues/list', params, { showLoading: false })
} catch (error) {
console.error("API调用失败:", error);
console.error("列表数据获取失败:", error);
throw error;
}
};