列表接口
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user