列表接口
This commit is contained in:
@@ -81,11 +81,13 @@ export const useListStore = create<TennisStore>()((set, get) => ({
|
||||
set({ loading: true, error: null })
|
||||
|
||||
try {
|
||||
const matches = await getTennisMatches(params)
|
||||
const resData = await getTennisMatches(params) || {};
|
||||
const { data = {}, code } = resData;
|
||||
const { count, rows } = data;
|
||||
set({
|
||||
matches,
|
||||
matches: rows || [],
|
||||
loading: false,
|
||||
lastRefreshTime: new Date().toISOString()
|
||||
// lastRefreshTime: new Date().toISOString()
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user