列表搜索页面

This commit is contained in:
juguohong
2025-09-01 00:03:43 +08:00
parent 7d4eb3d031
commit fdd6b8f7cb
18 changed files with 315 additions and 83 deletions

View File

@@ -19,6 +19,9 @@ const defaultDistance = 'all'; // 默认距离
export const useListStore = create<TennisStore>()((set, get) => ({
// 初始状态
matches: [],
// 推荐列表
recommendList: [],
// 是否加载中
loading: false,
error: null,
// 搜索的value
@@ -89,8 +92,14 @@ export const useListStore = create<TennisStore>()((set, get) => ({
suggestionList: [],
// 是否显示联想词
isShowSuggestion: false,
// 是否显示搜索框自定义导航
// 列表页是否显示搜索框自定义导航
isShowInputCustomerNavBar: false,
// 结果页是否显示搜索框自定义导航
isShowResultInputCustomerNavBar: false,
// 打开距离筛选框
isOpenDistancePopup: false,
// 打开快捷筛选框
isOpenQuickFilterPopup: false,
// 获取比赛数据
fetchMatches: async (params) => {
@@ -125,6 +134,8 @@ export const useListStore = create<TennisStore>()((set, get) => ({
})
set({
matches: list || rows || [],
recommendList: list || rows || [],
error: null,
loading: false,
gamesNum: count,
})