修复bug
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user