列表联调
This commit is contained in:
@@ -13,13 +13,18 @@ export interface TennisMatch {
|
||||
shinei: string
|
||||
}
|
||||
export interface IFilterOptions {
|
||||
dateRange: [], // 日期区间
|
||||
dateRange: [Date, Date], // 日期区间
|
||||
dateRangeQuick?: string, // 日期快捷选择
|
||||
timeSlot?: string, // 时间段
|
||||
ntrp?: [number, number], // NTRP 水平区间
|
||||
venueType?: string, // 场地类型
|
||||
playType?: string, // 玩法
|
||||
distanceFilter?: string
|
||||
}
|
||||
export interface ListState {
|
||||
currentPage: string
|
||||
isSearchResult: boolean
|
||||
searchResultData: TennisMatch[]
|
||||
matches: TennisMatch[]
|
||||
recommendList: TennisMatch[]
|
||||
location: {
|
||||
@@ -32,7 +37,7 @@ export interface ListState {
|
||||
isShowFilterPopup: boolean
|
||||
filterOptions: IFilterOptions
|
||||
filterCount: number
|
||||
distance: string | number
|
||||
// distance: string | number
|
||||
quickFilter: string | number
|
||||
distanceData: any[]
|
||||
quickFilterData: any[]
|
||||
@@ -41,12 +46,11 @@ export interface ListState {
|
||||
quick: string
|
||||
}
|
||||
timeBubbleData: BubbleOption[]
|
||||
locationOptions: BubbleOption[]
|
||||
gamePlayOptions: BubbleOption[]
|
||||
dateRangeOptions: BubbleOption[]
|
||||
gamesNum: number
|
||||
isScrollTop: boolean
|
||||
searchHistoryParams: Record<string, any>
|
||||
searchHistory: string[]
|
||||
searchHistory: {id: number, title: string}[]
|
||||
suggestionList: string[]
|
||||
isShowSuggestion: boolean
|
||||
isShowInputCustomerNavBar: boolean
|
||||
@@ -60,13 +64,9 @@ export interface ListState {
|
||||
}
|
||||
|
||||
export interface ListActions {
|
||||
fetchMatches: (params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
location?: string
|
||||
skillLevel?: string
|
||||
}) => Promise<void>
|
||||
// refreshMatches: () => Promise<void>
|
||||
fetchMatches: (params?: Record<string, any>) => Promise<void>
|
||||
// getIntegrateListData: (params?: Record<string, any>) => Promise<void>
|
||||
getMatchesData: () => void
|
||||
clearError: () => void
|
||||
updateState: (payload: Record<string, any>) => void
|
||||
updateFilterOptions: (payload: Record<string, any>) => void
|
||||
@@ -75,6 +75,16 @@ export interface ListActions {
|
||||
clearHistory: () => void
|
||||
searchSuggestion: (val: string) => Promise<void>
|
||||
getSearchParams: () => Record<string, any>
|
||||
loadMoreMatches: () => void
|
||||
initialFilterSearch: () => void
|
||||
setListData: (payload: IPayload) => void
|
||||
}
|
||||
|
||||
export interface IPayload {
|
||||
error: string;
|
||||
data: TennisMatch[];
|
||||
loading: boolean;
|
||||
gamesNum: number;
|
||||
}
|
||||
|
||||
// 快捷筛选
|
||||
@@ -143,27 +153,32 @@ export interface BubbleItemProps {
|
||||
export interface FilterPopupProps {
|
||||
onCancel: () => void;
|
||||
onConfirm: () => void;
|
||||
onChange: (params: Record<string, string>) => void;
|
||||
onChange: (params: Record<string, any>) => void;
|
||||
loading: boolean;
|
||||
filterOptions: Record<string, any>;
|
||||
onClear: () => void;
|
||||
visible: boolean;
|
||||
onClose: () => void;
|
||||
statusNavbarHeigh: number
|
||||
|
||||
}
|
||||
|
||||
// 列表卡片
|
||||
export interface ListCardProps {
|
||||
id: number;
|
||||
title: string;
|
||||
dateTime: string;
|
||||
location: string;
|
||||
distance: string;
|
||||
registeredCount: number;
|
||||
maxCount: number;
|
||||
skillLevel: string;
|
||||
id: string | number,
|
||||
title: string,
|
||||
start_time: string,
|
||||
location: string,
|
||||
distance_km: number,
|
||||
current_players: number,
|
||||
max_players: number,
|
||||
skill_level_min: number,
|
||||
skill_level_max: number,
|
||||
play_type: string,
|
||||
image_list: string[],
|
||||
court_type: string,
|
||||
matchType: string;
|
||||
images: string[];
|
||||
shinei: string;
|
||||
showSkeleton?: boolean;
|
||||
key?: string
|
||||
}
|
||||
Reference in New Issue
Block a user