修复bug

This commit is contained in:
李瑞
2025-10-12 23:49:02 +08:00
parent 35dfc7ffc8
commit 12600ebdfb
12 changed files with 45 additions and 33 deletions

View File

@@ -94,7 +94,7 @@ const commonStateDefaultValue = {
// 是否是搜索结果页
isSearchResult: false,
// 是否加载中
loading: true,
loading: false,
// 错误信息
error: null,
// 位置
@@ -225,6 +225,9 @@ export const useListStore = create<TennisStore>()((set, get) => ({
// 获取列表数据(常规搜索)
fetchMatches: async (params, isFirstLoad = false, isAppend = false) => {
if (get().loading) {
return;
}
set({ loading: true, error: null });
const { getSearchParams, setListData } = get();
@@ -463,14 +466,14 @@ export const useListStore = create<TennisStore>()((set, get) => ({
searchPageState: {
...searchPageStateDefaultValue
},
loading: true,
// loading: true,
});
} else {
set({
listPageState: {
...listPageStateDefaultValue
},
loading: true,
// loading: true,
});
}
if (!isSearchData) {