feat: 切换城市

This commit is contained in:
2025-10-15 20:34:08 +08:00
parent f63295db13
commit fcd9cc7d4c
13 changed files with 472 additions and 118 deletions

View File

@@ -51,10 +51,24 @@ export interface SearchPageState extends PageState {
data: TennisMatch[]
suggestionList: string[]
isShowSuggestion: boolean
searchHistory: {id: number, title: string}[]
searchHistory: { id: number, title: string }[]
searchHistoryParams: Record<string, any>
}
export interface CityTree {
id?: number;
name: string;
children: CityTree[];
}
export interface CityQrCodeItem {
id: number,
city_name: string,
qr_code_url: string,
description: string,
sort_order: number
}
// 主状态接口
export interface ListState {
currentPage: string
@@ -73,6 +87,9 @@ export interface ListState {
timeBubbleData: BubbleOption[]
dateRangeOptions: BubbleOption[]
gamesNum: number
cities: CityTree[]
cityQrCode: CityQrCodeItem[]
area: [string, string, string]
}
export interface ListActions {
@@ -96,6 +113,9 @@ export interface ListActions {
getCurrentPageState: () => { currentPageState: any; currentPageKey: string }
updateCurrentPageState: (payload: Record<string, any>) => void
updateDistanceQuickFilter: (payload: Record<string, any>) => void
getCities: () => Promise<void>
getCityQrCode: () => Promise<void>
updateArea: (payload: [string, string, string]) => void
}
export interface IPayload {