Appearance
體育賽事列表(開發文檔)
最後更新:2026-04-10
📖 功能說明請參考 體育賽事列表
架構
相關檔案
ViewController(2 個)
| 檔案 | 說明 |
|---|---|
.../EventList/SportSegmented/SportSegmentedController.swift | 賽事列表主控制器 |
.../HomePage/SportHomeViewController.swift | 體育首頁 |
基礎路徑:
BBSport/Tab/体育/Sport/
ViewModel / UseCase(13 個)
| 檔案 | 說明 |
|---|---|
.../SportSegmentedViewModel.swift | 列表主 ViewModel |
.../UseCase/Menu/SportMenusUseCase.swift | 球類選單 |
.../UseCase/Match/SportMatchUseCase.swift | 賽事請求 |
.../UseCase/PlayMethod/SportPlayMethodUseCase.swift | 玩法切換 |
.../UseCase/LeagueFilter/SportMatchLeagueFilterUseCase.swift | 熱門聯賽篩選 |
.../UseCase/Calendar/SportCalendarUseCase.swift | 日期篩選 |
.../UseCase/FinishMatch/SportFinishMatchUseCase.swift | 完賽篩選 |
.../UseCase/FinishMatch/SportFinishMatchFilterControllerBuilder.swift | 完賽篩選建構器 |
.../UseCase/Fold/SportMatchFoldUseCase.swift | 折疊 |
.../UseCase/HotLeague/HotLeagueUseCase.swift | 熱門聯賽 Protocol |
.../UseCase/HotLeague/SportHotLeagueUseCase.swift | 熱門聯賽實作 |
.../UseCase/LeagueFilter/SportLeagueFirstLetterUseCase.swift | 聯賽首字母 |
.../UseCase/Calendar/Formatter/SportCalendarFormatter.swift | 日曆格式 Protocol |
基礎路徑:
BBSport/Tab/体育/Sport/EventList/SportSegmented/
Service — Match(24 個)
| 檔案 | 說明 |
|---|---|
.../FB/FBSportInPlayMatchService.swift | FB 滾球 |
.../FB/FBSportTodayMatchService.swift | FB 今日 |
.../FB/FBSportEarlyMatchService.swift | FB 早盤 |
.../FB/FBSportFavoriteMatchService.swift | FB 收藏 |
.../FB/FBSportChampionMatchService.swift | FB 冠軍 |
.../FB/FBSportMatchResultService.swift | FB 賽果 |
.../FB/FBSportSeriesOddsService.swift | FB 串關賠率 |
.../DB/DBSportInPlayMatchService.swift | DB 滾球 |
.../DB/DBSportTodayMatchService.swift | DB 今日 |
.../DB/DBSportEarlyMatchService.swift | DB 早盤 |
.../DB/DBSportChampionMatchService.swift | DB 冠軍 |
.../DB/DBSportFavoriteMatchService.swift | DB 收藏 |
.../DB/DBSportMatchResultService.swift | DB 賽果 |
.../UP/UPSportInPlayMatchService.swift | UP 滾球 |
.../UP/UPSportTodayMatchService.swift | UP 今日 |
.../UP/UPSportEarlyMatchService.swift | UP 早盤 |
.../UP/UPSportFavoriteMatchService.swift | UP 收藏 |
.../UP/UPSportChampionMatchService.swift | UP 冠軍 |
.../UP/UPSportMatchResultService.swift | UP 賽果 |
.../UP/UPSportSeriesOddsService.swift | UP 串關賠率 |
.../BB/InPlayRankMatchService.swift | BB 滾球排名 |
.../PollingSportMatchService.swift | 輪詢基底 |
.../SportMatchService.swift | 賽事 Protocol |
.../SportMatchRequestParameter.swift | 請求參數 Model |
基礎路徑:
BBSport/Tab/体育/Sport/EventList/SportSegmented/Service/Match/
Service — Menu(8 個)
| 檔案 | 說明 |
|---|---|
.../FB/FBSportMenusService.swift | FB 選單 |
.../FB/FBSportMenusServices.swift | FB 選單集合 |
.../DB/DBSportMenusService.swift | DB 選單 |
.../DB/DBSportMenusServices.swift | DB 選單集合 |
.../UP/UPSportMenusService.swift | UP 選單 |
.../UP/UPSportMenusServices.swift | UP 選單集合 |
.../SportFavoriteMenusService.swift | 收藏選單 |
.../SportMenusService.swift | 選單 Protocol |
基礎路徑:
BBSport/Tab/体育/Sport/EventList/SportSegmented/Service/Menu/
View / Cell(47 個)
| 檔案 | 說明 |
|---|---|
.../Cell/List/Body/MatchListBodyCell.swift | 賽事列表 Cell |
.../Cell/List/Body/MatchListBodyCell+FB.swift | FB 平台擴展 |
.../Cell/List/Body/MatchListBodyCell+DB.swift | DB 平台擴展 |
.../Cell/List/Body/MatchListBodyCell+UP.swift | UP 平台擴展 |
.../Cell/List/Body/MatchListBodyCell+Odd.swift | 賠率擴展 |
.../Cell/List/Body/MatchListBodyCell+TeamInfo.swift | 隊伍資訊 |
.../Cell/List/Body/MatchListBodyCell+ColorCard.swift | ColorCard |
.../Cell/List/Body/MatchListBodyCell+FinishGame.swift | 完賽擴展 |
.../Cell/List/Head/MatchListHeaderCell.swift | 聯賽 Header Cell |
.../Cell/Champion/ChampionListBodyDetailCell.swift | 冠軍 Cell |
.../Cell/Champion/ChampionListBodyHeadCell.swift | 冠軍 Header |
.../Cell/Champion/ChampionListHeadOtherView.swift | 冠軍其他 |
.../Cell/LeagueChoose/LeagueChooseCell.swift | 聯賽選擇 Cell |
.../Cell/LeagueChoose/SectionIndexViewCell.swift | 索引 Cell |
.../Cell/List/Body/View/MatchListBasketBallView.swift | 籃球列表 |
.../Cell/List/Body/View/MatchListBottomESportsView.swift | 電競底部 |
.../Cell/List/Body/View/MatchListBottomEventView.swift | 賽事底部 |
.../TitleView/SportIconScrollBar.swift | 球類圖示列 |
.../TitleView/SportIconScrollBarCell.swift | 球類圖示 Cell |
.../TitleView/SportTimeScrollBar.swift | 時間軸 |
.../TitleView/SportTimeScrollBarCell.swift | 時間軸 Cell |
.../TitleView/CalendarCoverView.swift | 日曆覆蓋層 |
.../TitleView/HomePageTitleStyle.swift | 首頁標題樣式 |
.../TitleView/HomePageTitleView.swift | 首頁標題 |
.../TitleView/PlayMethodButton.swift | 玩法按鈕 |
.../TitleView/PlayMethodSwitch.swift | 玩法切換 |
.../TitleView/SortByTimeOrLeagueComponent.swift | 時間/聯賽排序 |
.../SectionView/MatchSectionScoreView.swift | 得分區域 |
.../SectionView/MatchSectionScoreView+BasketBall.swift | 得分-籃球 |
.../SectionView/MatchSectionScoreView+Tennis.swift | 得分-網球 |
.../SectionView/MatchSectionScoreView+VolleyBall.swift | 得分-排球 |
.../SectionView/MatchSectionScoreView+IceHockey.swift | 得分-冰球 |
.../SectionView/MatchSectionScoreView+TableTennis.swift | 得分-乒乓球 |
.../SectionView/MatchSectionScoreView+AmericanFootball.swift | 得分-美式足球 |
.../SectionView/MatchSectionScoreView+Badmintion.swift | 得分-羽毛球 |
.../SectionView/MatchSectionScoreView+ESports.swift | 得分-電競 |
.../SectionView/MatchSectionScoreView+EBasketball.swift | 得分-電競籃球 |
.../BetView/SportSelectBetView.swift | 投注選擇 |
.../Champion/ChampionBetListSectionHeaderView.swift | 冠軍盤口 Header |
.../Champion/FixedChampionBetListSectionHeader.swift | 冠軍固定 Header |
.../DropView/DropDownMenuViewController.swift | 下拉選單 |
.../DropView/STSportPlayTypeManager.swift | 玩法類型管理 |
.../NetWorkView/NoNetworkPlaceholderView.swift | 無網路佔位 |
.../RefreshView/EventListFooterRefresh.swift | 列表 Footer 刷新 |
.../RefreshView/EventListHeaderRefreshView.swift | 列表 Header 刷新 |
.../Video/AnchorLanguageTipView.swift | 主播語言提示 |
.../Protocol/BBSportLoginAlertViewProtocol.swift | 登入提示 Protocol |
基礎路徑:
BBSport/Tab/体育/Sport/EventList/Base/V/(除 DropView / Protocol)
Adapter(12 個)
| 檔案 | 說明 |
|---|---|
.../Adapter/SportEventListAdapter.swift | 列表主 Adapter |
.../Adapter/Delegator/SportEventListDelegator.swift | Delegator 基底 |
.../Adapter/Delegator/FixtureEventListDelegator.swift | 賽程 Delegator |
.../Adapter/Delegator/OutrightEventListDelegator.swift | 冠軍 Delegator |
.../Adapter/CellConfiguration/SportEventListCellConfiguration.swift | CellConfig 基底 |
.../Adapter/CellConfiguration/FoldableSportEventListCellConfiguration.swift | 可折疊 |
.../Adapter/CellConfiguration/Fixture/FixtureEventListCellConfiguration.swift | 賽程 |
.../Adapter/CellConfiguration/Fixture/FinishedFixtureEventListCellConfiguration.swift | 完賽 |
.../Adapter/CellConfiguration/Outright/OutrightEventListCellConfiguration.swift | 冠軍 |
.../Adapter/PlayMethod/SportEventPlayMethodHandler.swift | 玩法處理 |
.../Repository/Favorite/SportFavoriteRepository.swift | 收藏 Protocol |
.../Repository/Favorite/UPSportFavoriteRepository.swift | UP 收藏 |
基礎路徑:
BBSport/Tab/体育/Sport/EventList/SportSegmented/
Repository / 收藏(2 個)
| 檔案 | 說明 |
|---|---|
.../Repository/Favorite/FBSportFavoriteRepository.swift | FB 收藏 |
.../Repository/Favorite/DBSportFavoriteRepository.swift | DB 收藏 |
基礎路徑:
BBSport/Tab/体育/Sport/EventList/SportSegmented/
Banner / 首頁(22 個)
| 檔案 | 說明 |
|---|---|
.../HomePage/Adapter/SportBannerAdapter.swift | Banner Adapter |
.../HomePage/Adapter/SportBetCartAdapter.swift | 投注購物車 |
.../HomePage/Adapter/SportFloatingBallViewAdapter.swift | 浮球 |
.../HomePage/Adapter/SportMaintenanceAdapter.swift | 維護 |
.../HomePage/Adapter/SportNavViewAdapter.swift | 導航列 |
.../HomePage/Adapter/SportSegmentAdapter.swift | 分段控制 |
.../HomePage/Adapter/SportSlideAdapter.swift | 滑動 |
.../HomePage/Shared/GameType+SportPage.swift | GameType 擴展 |
.../HomePage/Shared/SlideView/SlideView.swift | 滑動視圖 |
.../HomePage/Shared/SlideView/SlideViewDataSource.swift | 滑動 DataSource |
.../HomePage/Shared/SlideView/SlideViewDelegate.swift | 滑動 Delegate |
.../HomePage/Shared/SportScrollWrapper/SportScrollWrapper.swift | 滾動包裝 |
.../Banner/Model/BBHomeChatModel.swift | 首頁聊天 Model |
.../Banner/Model/SportHomeBannerModel.swift | Banner Model |
.../Banner/SportHomeBannerService.swift | Banner Service |
.../Banner/V/AnnouncementView.swift | 公告 |
.../Banner/V/BBComplexView.swift | 複合視圖 |
.../Banner/V/BBCustomBannerCell.swift | 自訂 Banner Cell |
.../Banner/V/BBMatchInfoView.swift | 賽事資訊 |
.../Banner/V/HomeNavView.swift | 首頁導航 |
.../Banner/V/IFBannerView.swift | Banner 輪播 |
.../Banner/V/SportHomeSegmentedControl/SportHomeSegmentedControl.swift | 分段控制 |
基礎路徑:
BBSport/Tab/体育/Sport/
聯賽篩選 / 搜尋(16 個)
| 檔案 | 說明 |
|---|---|
.../General/Models/LeagueChooseVO.swift | 聯賽選擇 VO |
.../General/ViewModels/CompsLeagueViewModel.swift | 聯賽比較 VM |
.../STLeagueFiltering/C/STLeagueChooseViewController.swift | 聯賽篩選 VC |
.../STLeagueFiltering/C/STLeagueChooseViewController+Action.swift | 篩選 Action |
.../STLeagueFiltering/C/STLeagueChooseViewController+Data.swift | 篩選 Data |
.../STLeagueFiltering/C/STLeagueFilteringController.swift | 聯賽過濾 VC |
.../STLeagueFiltering/Models/STLeagueFilterModel.swift | 篩選 Model |
.../STLeagueFiltering/Models/STLeagueModel+VM.swift | 聯賽 VM |
.../STLeagueFiltering/V/STLeagueChooseBottomView.swift | 選擇底部 |
.../STLeagueFiltering/V/STLeagueChooseCell.swift | 選擇 Cell |
.../STLeagueFiltering/V/STLeagueChooseListView.swift | 選擇列表 |
.../SearchAndLeagueFiltering/M/LeagueChooseCache.swift | 快取 |
.../SearchAndLeagueFiltering/V/CustomBar.swift | 搜尋列 |
.../SearchAndLeagueFiltering/V/LeagueChooseHeadView.swift | 選擇 Header |
.../SearchAndLeagueFiltering/V/LeagueSectionIndexView.swift | 索引 |
.../SearchAndLeagueFiltering/V/NewLeagueChooseCell.swift | 新聯賽 Cell |
基礎路徑:
BBSport/Tab/体育/Sport/LeagueScreening_Search/Features/
API Request(35 個)
| 檔案 | 說明 |
|---|---|
BBSport/API/FBSportAPI/FBSportAPI+MatchListRequest.swift | FB 賽事列表 |
BBSport/API/FBSportAPI/FBSportAPI+OnSaleLeaguesRequest.swift | FB 在售聯賽 |
BBSport/API/FBSportAPI/FBSportAPI+BulletinListPageRequest.swift | FB 公告 |
BBSport/API/FBSportAPI/Sport/FBSportAPI+StatisticalRequest.swift | FB 統計 |
BBSport/API/FBSportAPI/FBSportAPI+FetchLanguageRequest.swift | FB 語言 |
BBSport/API/FBSportAPI/FBSportAPI.swift | FB 基底 |
BBSport/API/FBSportAPI/Domain/FBSportAPI+DomainCheckRequest.swift | FB Domain |
BBSport/API/FBSportAPI/Repository/FBSportFastestDomainRepository.swift | FB 最快域名 |
BBSport/API/UPSportAPI/UPSportAPI+MatchListRequest.swift | UP 賽事列表 |
BBSport/API/UPSportAPI/UPSportAPI+OnSaleLeaguesRequest.swift | UP 在售聯賽 |
BBSport/API/UPSportAPI/UPSportAPI+BulletinListPageRequest.swift | UP 公告 |
BBSport/API/UPSportAPI/Sport/UPSportAPI+StatisticalRequest.swift | UP 統計 |
BBSport/API/UPSportAPI/UPSportAPI+FetchLanguageRequest.swift | UP 語言 |
BBSport/API/UPSportAPI/UPSportAPI.swift | UP 基底 |
BBSport/API/UPSportAPI/Domain/UPSportAPI+DomainCheckRequest.swift | UP Domain |
BBSport/API/UPSportAPI/Repository/UPSportFastestDomainRepository.swift | UP 最快域名 |
BBSport/API/DBSportAPI/DBSportAPI.swift | DB 基底 |
BBSport/API/DBSportAPI/DBSportAPI+Host.swift | DB Host |
BBSport/API/DBSportAPI/Sport/DBSportAPI+CategoryListRequest.swift | DB 分類列表 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+ChampionLeagueListRequest.swift | DB 冠軍聯賽 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+ChampionMatchResultRequest.swift | DB 冠軍賽果 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+DBEventInfoRequest.swift | DB 賽事資訊 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+EventDetailRequest.swift | DB 賽事詳情 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+FavoriteEventsRequest.swift | DB 收藏 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+LeagueCountRequest.swift | DB 聯賽數量 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+MatchOddsInfoRequest.swift | DB 盤口賠率 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+MatcheResultRequest.swift | DB 賽果 |
BBSport/API/DBSportAPI/Sport/DBSportAPI+SportMenuRequest.swift | DB 選單 |
BBSport/API/STAPI/Sport/HomeBanner/STAPI+HomeBannerRequest.swift | 首頁 Banner |
BBSport/API/STAPI/Sport/STAPI+InPlayMatchRank.swift | 滾球排名 |
BBSport/API/STAPI/Sport/STAPI+MenuSequenceRequest.swift | 球類選單順序 |
BBSport/API/STAPI/Sport/STAPI+LeagueWeightsRequest.swift | 聯賽權重 |
BBSport/API/STAPI/Sport/STAPI+AllPlanListsRequest.swift | 方案列表 |
BBSport/API/STAPI/Sport/STAPI+PlanListRequest.swift | 方案查詢 |
BBSport/API/STAPI/Sport/STAPI+PlanBuyCountRequest.swift | 方案購買數 |
Model / Enum / Config(12 個)
| 檔案 | 說明 |
|---|---|
.../Sport/Model/BetItemModel.swift | 投注項 |
.../Sport/Model/Enum/BetResultType.swift | 投注結果類型 |
.../Sport/Model/Enum/OddChangeStatus.swift | 賠率變動狀態 |
.../Sport/Model/OddChangeHandler.swift | 賠率變動處理 |
.../Sport/Model/Protocol/ILeagueModel.swift | 聯賽 Protocol |
.../Sport/Model/Protocol/ISportModel.swift | 體育 Protocol |
.../Sport/Model/Protocol/ITransformable.swift | 轉換 Protocol |
.../Sport/Common/CommonSportType.swift | 共用球類類型 |
.../Sport/Common/SportComponentConst.swift | 體育常數 |
.../Sport/Common/SportConfiguration/SportConfig.swift | 體育設定 Protocol |
.../Sport/Common/SportConfiguration/STSportsConfig.swift | ST 設定 |
.../Sport/Common/SportConfiguration/OBSportsConfig.swift | OB 設定 |
基礎路徑:
BBSport/Tab/体育/
API
賽事列表
FB/UP 賽事列表
POST v1/match/getList — JSON — 來源:FBSportAPI / UPSportAPI
TIP
FB 與 UP endpoint 相同,差異在 Request struct 分屬不同 namespace,各自走不同 domain。
Request:
| 參數 | 型別 | 必填 | 說明 |
|---|---|---|---|
| sportId | string | ✅ | 球類 ID(如 "1" 足球) |
| type | int | ✅ | 1=滾球、2=串關、3=今日、4=早盤、5=競彩、7=冠軍 |
| languageType | string | ✅ | 固定 "CMN" |
| current | int | ✅ | 頁碼,從 1 開始 |
| orderBy | int | ✅ | 0=按開賽時間、1=按聯賽排序 |
| leagueIds | [int] | 聯賽 ID 陣列,空=不篩選 | |
| beginTime | string | 篩選開始時間(早盤/完賽時使用) | |
| endTime | string | 篩選結束時間 | |
| isPC | bool | 冠軍賽事時傳 true |
Response:(success=true 時 data,型別 STDataModel)
| 欄位 | 型別 | 說明 |
|---|---|---|
| records | [STEventModel] | 賽事列表 |
| pageTotal | Int | 總頁數 |
| current | Int | 當前頁碼 |
| size | Int | 每頁數量 |
| total | Int | 賽事總筆數 |
FB/UP 冠軍賽事列表
POST v1/match/getList — JSON — 來源:FBSportAPI / UPSportAPI
TIP
與一般賽事列表共用 endpoint,差異在 type=7 且帶 isPC=true。
Request:
| 參數 | 型別 | 必填 | 說明 |
|---|---|---|---|
| sportId | string | ✅ | 球類 ID |
| type | int | ✅ | 固定 7 |
| languageType | string | ✅ | 固定 "CMN" |
| orderBy | int | ✅ | 固定 1 |
| isPC | bool | ✅ | 固定 true |
Response: 同 FB/UP 賽事列表。
DB 賽事列表(滾球/今日/早盤)
POST api/forehead/gamebetob/getEventInfo — urlForm — 來源:DBSportAPI
Request:
| 參數 | 型別 | 必填 | 說明 |
|---|---|---|---|
| sportIds | string | ✅ | 運動 ID(如 "1") |
| market | int | ✅ | 1=滾球、2=即將開賽、3=今日、4=早盤、11=串關 |
| sort | int | ✅ | 1=按聯賽、2=按時間 |
| pageNumber | int | ✅ | 頁碼,從 1 開始 |
| pageSize | int | ✅ | 每頁數量,預設 50 |
| language | string | ✅ | 固定 "chs" |
| competitionIds | string | 聯賽 ID,逗號分隔 | |
| eventBeginTime | string | 篩選開始時間 | |
| eventEndTime | string | 篩選結束時間 |
Response:(code="0000000" 時 data,型別 OBEventInfoModel)
| 欄位 | 型別 | 說明 |
|---|---|---|
| pages | String | 總頁數 |
| cto | String | 額外資訊 |
| data | [OBEventModel] | 賽事資料列表 |
| list | [OBEventModel] | 快取服務賽事資料 |
DB 冠軍聯賽列表
POST yewu11/v1/m/matchesPB — JSON — 來源:DBSportAPI
Request:
| 參數 | 型別 | 必填 | 說明 |
|---|---|---|---|
| euid | string | ✅ | 球類 menu ID |
| cuid | string | ✅ | 使用者 ID |
| type | int | ✅ | 固定 100 |
| sort | int | ✅ | 固定 1 |
Response:(code="0000000" 時 data,型別 [OBEventModel]?)
DB 收藏賽事
POST yewu11/v1/m/getMatchBaseInfoByMidsPB — JSON — 來源:DBSportAPI
| 參數 | 型別 | 必填 | 說明 |
|---|---|---|---|
| mids | [string] | ✅ | 賽事 ID 陣列(由本地收藏庫取得) |
Response: 同 DB 賽事列表(滾球/今日/早盤)。
DB 聯賽數量
POST api/forehead/gamebetob/getLeagueCount — urlForm — 來源:DBSportAPI
| 參數 | 型別 | 必填 | 說明 |
|---|---|---|---|
| sportId | string | ✅ | 運動 ID |
| type | int | ✅ | 選單類型 |
| language | string | ✅ | 固定 "chs" |
| eventBeginTime | string | 篩選開始時間 | |
| eventEndTime | string | 篩選結束時間 |
Response:(code="0000000" 時 data,型別 OBLeagueResultDataModel)
| 欄位 | 型別 | 說明 |
|---|---|---|
| imageUrl | String | 圖片 URL |
| tournamentList | [OBLeagueResultTournamentListModel] | 聯賽列表(含 lurl、nameText、num、tid) |
熱門與選單
熱門球類排行
POST api/forehead/data/betting/inPlayMatchRank — urlForm — 來源:STAPI
| 參數 | 型別 | 必填 | 說明 |
|---|---|---|---|
| isInPlay | string | ✅ | 固定 "true" |
| sportIds | string | ✅ | 球類 ID,預設 "1,3" |
| marketTypes | string | ✅ | 盤口類型,預設 "3002,3003,3004,1000,1005,1007" |
Response:(code=1 時 data,型別 InPlayMatchRankResponse)
| 欄位 | 型別 | 說明 |
|---|---|---|
| matchRank | [InPlayMatchRankModel] | 排名列表(含 count、matchId、marketRank) |
球類選單順序
POST api/forehead/gamebet/config/gameHomeTabSort — JSON — 來源:STAPI
無參數,靠 Header token/uid 認證。
Response:(code=1 時 data,型別 [String: SequenceDataModel])
| 欄位 | 型別 | 說明 |
|---|---|---|
| (key) | String | 平台標識 |
| (value).collection | Int | 收藏 Tab 排序值 |
| (value).champion | Int | 冠軍 Tab 排序值 |
全局熱搜
POST api/forehead/data/user/global/search/hotLeague — urlForm — 來源:STAPI
無參數。
Response:(code=1 時 data,型別 [League])
| 欄位 | 型別 | 說明 |
|---|---|---|
| leagueId | String | 聯賽 ID |
| leagueName | String | 聯賽名稱 |
| leagueLogo | String | 聯賽 Icon URL |
| matches | [Match] | 賽事列表(含 home、away、homeScore、awayScore、eventId) |
資料模型
STEventModel 完整欄位(25 個)
| 欄位 | 類型 | 說明 |
|---|---|---|
| id | Int | 賽事 ID |
| sid | Int | 球類 ID |
| lg | STLeagueModel | 聯賽資料 |
| ts | [STLeagueModel] | 球隊陣列(ts[0]=主隊、ts[1]=客隊) |
| mg | [STMarketGroupModel] | 盤口集合 |
| mgs | [STMarketGroupModel] | 賽果 API 盤口 |
| nmg | [STMarketGroupModel] | 列表過濾後盤口 |
| sg | [STEventResultModel] | 比分資訊 |
| nsg | [STEventResultModel] | 新比分資訊 |
| result | EventScoreboardModel | 比分看板 |
| mc | STTimeModel | 比賽時鐘(s=秒數、pe=時段、r=是否跑表) |
| bt | Double | 開賽時間(時間戳) |
| beginTime | String | 開賽時間(字串) |
| nm | String | 冠軍賽事名稱 |
| ms | MatchStatus | 賽事狀態(0=已結束、1=推遲、2=中斷、3=取消、4=未開賽、5=進行中) |
| fid | Int | 賽制 |
| ne | Int | 中立場(1=中立場、0=非中立場) |
| vs | VsParameterModel? | 動畫/直播串流資訊 |
| nas | [String] | 動畫資訊 |
| ssi | Int | 發球方 |
| tms | Int | 盤口統計數量 |
| isInplay | Bool | 是否滾球 |
| isFinish | Bool | 賽事是否結束 |
| pt | STPlayType | 賽事類型(1=今日、2=早盤、4=滾球) |
| lsdata | FootBallTechnicModel? | 雷速數據(足球特有) |
OBEventModel(DB 賽事)
OBEventModel 完整欄位(43 個)
| 欄位 | 類型 | 說明 |
|---|---|---|
| mid | String | 賽事 ID |
| csid | String | 球類 ID |
| csna | String | 球類名稱 |
| tid | String | 聯賽 ID |
| tn | String | 聯賽名稱 |
| onTn | String | 冠軍聯賽名稱 |
| tlev | Int | 聯賽等級 |
| mhid | String | 主隊 ID |
| mhn | String | 主隊名稱 |
| man | String | 客隊名稱 |
| maid | String | 客隊 ID |
| mhlu | [String] | 主隊 Logo URL 陣列 |
| mhlut | String | 主隊 Logo 縮略圖 |
| malu | [String] | 客隊 Logo URL 陣列 |
| malut | String | 客隊 Logo 縮略圖 |
| mgt | String | 開賽時間(毫秒時間戳) |
| mgt_str | String | 格式化開賽時間 |
| med | String | 賽事截止時間 |
| med_str | String | 格式化截止時間 |
| mst | String | 賽事進行時間(秒) |
| mcg | Int | 欄目類型(1=滾球、2=即將開賽、3=今日、4=早盤) |
| mmp | String | 比賽階段 |
| mms | Int | 視頻狀態(-1=無、0=不可用、1=可用未播、2=播放中) |
| mct | String | 當前第幾盤/局 |
| mat | String | 發球方(home/away) |
| mo | Int | 比賽是否結束 |
| mp | Int | 是否支持賽前盤 |
| ms | Int? | 賽事狀態(0=未開始、1=滾球、2=暫停、3=結束...) |
| mc | Int | 玩法數量 |
| hps | [OBOddInfoModel] | 玩法集合 |
| mng | Int | 是否中立場(1=是、0=否) |
| mle | Int | 賽節配置 |
| mvs | Int | 動畫狀態(-1=無、0=不可用、1=播放中) |
| mfo | String | 賽制 |
| mhs | Int | 盤口狀態(0=開、1=封、2=關、11=鎖) |
| mft | Int | 總局數 |
| msc | [String] | 比分集合(格式:S1|1:0) |
| mbhn | String | 好球數(棒球) |
| mbkn | String | 壞球數(棒球) |
| mbcn | String | 出局數(棒球) |
| mbolp | String | 一壘佔用(棒球,0/1) |
| mbtlp | String | 二壘佔用(棒球,0/1) |
| mbthlp | String | 三壘佔用(棒球,0/1) |
STLeagueModel(聯賽)
| 欄位 | 類型 | 說明 |
|---|---|---|
| id | Int | 聯賽 ID |
| na | String | 聯賽名稱 |
| lurl | String | 聯賽 Logo URL |
| sportId | Int | 球類 ID |
| events | [STEventModel] | 賽事列表 |
實作重點
- UseCase 依賴注入:ViewModel 透過建構子注入各 UseCase,不同平台/玩法對應不同組合
- 多平台 Cell 差異:各平台透過 Extension 處理不同的賠率格式與 UI
- 熱門聯賽過濾:FB InPlay 足球/籃球有熱門聯賽標記,影響排序與 Header
- 日期篩選:各平台格式不同,透過
SportCalendarFormatter轉換 - 已知限制:DB 冠軍不支援串關,DB/UP 早盤預約投注與 FB 不同
- 長按賠率互動:功能說明提及「長按賠率 → 展開更多玩法」。實際程式碼中,賽事列表
SportSelectBetView的點擊(tap)直接彈出投注面板,而點擊賽事行(非賠率區域)跳轉賽事詳情頁以查看完整盤口。目前 EventList 未發現專門的UILongPressGestureRecognizer對賠率進行長按處理,「長按」行為可能已合併為一般點擊跳轉賽事詳情。
關鍵數字
- 滾球輪詢間隔:5 秒
- 今日輪詢間隔:30 秒
- 早盤輪詢間隔:60 秒
- DB 每頁數量:50 條