列表
This commit is contained in:
@@ -20,12 +20,45 @@ export interface IFilterOptions {
|
||||
playType?: string, // 玩法
|
||||
distanceFilter?: string
|
||||
}
|
||||
// 页面状态接口
|
||||
export interface PageState {
|
||||
data: TennisMatch[]
|
||||
recommendList: TennisMatch[]
|
||||
isShowFilterPopup: boolean
|
||||
filterOptions: IFilterOptions
|
||||
distanceQuickFilter: {
|
||||
distance: string
|
||||
quick: string
|
||||
}
|
||||
filterCount: number
|
||||
pageOption: {
|
||||
page: number
|
||||
pageSize: number
|
||||
}
|
||||
gamesNum: number
|
||||
isHasMoreData: boolean
|
||||
}
|
||||
|
||||
// 列表页状态
|
||||
export interface ListPageState extends PageState {
|
||||
isShowInputCustomerNavBar: boolean
|
||||
}
|
||||
|
||||
// 搜索页状态
|
||||
export interface SearchPageState extends PageState {
|
||||
searchResultData: TennisMatch[]
|
||||
suggestionList: string[]
|
||||
isShowSuggestion: boolean
|
||||
searchHistory: {id: number, title: string}[]
|
||||
searchHistoryParams: Record<string, any>
|
||||
}
|
||||
|
||||
// 主状态接口
|
||||
export interface ListState {
|
||||
currentPage: string
|
||||
isSearchResult: boolean
|
||||
searchResultData: TennisMatch[]
|
||||
matches: TennisMatch[]
|
||||
recommendList: TennisMatch[]
|
||||
listPageState: ListPageState
|
||||
searchPageState: SearchPageState
|
||||
location: {
|
||||
latitude: number
|
||||
longitude: number
|
||||
@@ -33,32 +66,11 @@ export interface ListState {
|
||||
loading: boolean
|
||||
error: string | null
|
||||
searchValue: string
|
||||
isShowFilterPopup: boolean
|
||||
filterOptions: IFilterOptions
|
||||
filterCount: number
|
||||
distanceData: any[]
|
||||
quickFilterData: any[]
|
||||
distanceQuickFilter: {
|
||||
distance: string
|
||||
quick: string
|
||||
}
|
||||
timeBubbleData: BubbleOption[]
|
||||
dateRangeOptions: BubbleOption[]
|
||||
gamesNum: number
|
||||
isHasMoreData: boolean
|
||||
isScrollTop: boolean
|
||||
searchHistoryParams: Record<string, any>
|
||||
searchHistory: {id: number, title: string}[]
|
||||
suggestionList: string[]
|
||||
isShowSuggestion: boolean
|
||||
isShowInputCustomerNavBar: boolean
|
||||
isShowResultInputCustomerNavBar: boolean
|
||||
isOpenDistancePopup: boolean,
|
||||
isOpenQuickFilterPopup: boolean,
|
||||
pageOption: {
|
||||
page: number
|
||||
pageSize: number
|
||||
}
|
||||
}
|
||||
|
||||
export interface ListActions {
|
||||
@@ -67,6 +79,8 @@ export interface ListActions {
|
||||
getMatchesData: () => void
|
||||
clearError: () => void
|
||||
updateState: (payload: Record<string, any>) => void
|
||||
updateListPageState: (payload: Record<string, any>) => void
|
||||
updateSearchPageState: (payload: Record<string, any>) => void
|
||||
updateFilterOptions: (payload: Record<string, any>) => void
|
||||
clearFilterOptions: () => void
|
||||
getSearchHistory: () => Promise<void>
|
||||
|
||||
Reference in New Issue
Block a user