Skip to content

我的首頁(開發文檔)

最後更新:2026-04-10

📖 功能說明請參考 我的首頁


架構

相關檔案

ViewController(7 個)
檔案說明
.../Home/C/BBMineViewController.swift我的主頁
.../Home/C/VIPViewController.swiftVIP 中心
.../Home/C/ContactBenefitMemberViewController.swift專屬客服
.../Home/C/PhotoBrowserViewController.swift照片瀏覽
.../Mine/Tasks/C/BBTasksDetailViewController.swift任務詳情
.../Mine/Tasks/C/SignInSuccessViewController.swift簽到成功
.../Mine/BottomMenu/C/BBFeedBackViewController.swift意見回饋

基礎路徑:BBSport/Tab/我的/

ViewModel(5 個)
檔案說明
.../Home/C/BBMineViewModel.swift主頁 ViewModel
.../Home/M/MyTask/STCheckInViewModel.swift簽到任務
.../Mine/Tasks/VM/BBTasksDetailViewModel.swift任務詳情
.../Mine/Tasks/M/BBDailyTaskCellViewModel.swift每日任務 Cell
.../Home/M/PhotoBrowserViewModel.swift照片瀏覽

基礎路徑:BBSport/Tab/我的/

View — Header(6 個)
檔案說明
.../Home/V/BBMineHeadView.swiftHeader
.../Home/V/BBNewHeaderTopView.swiftHeader 頂部
.../Home/V/AccountBalanceView.swift帳戶餘額
.../Home/V/BBMineHeaderVipView.swiftVIP Header
.../Home/V/BBMineAccountView.swift帳戶區塊
.../Home/V/BBMineCustomerServiceButton.swift客服按鈕

基礎路徑:BBSport/Tab/我的/

View — Cell(11 個)
檔案說明
.../Home/V/BBMineOrderProgressCell.swift訂單進度
.../Home/V/BBMineMySignProgressCell.swift簽到進度
.../Home/V/BBMineMyTaskProgressCell.swift任務進度
.../Home/V/BBMineActivityCell.swift活動 Banner
.../Home/V/BBMineInfoCell.swiftApp 資訊
.../Home/V/BBMineOrderStatusCell.swift訂單狀態
.../Home/V/BBMineUserInfoCell.swift用戶資訊
.../Home/V/BBMineSeparatorLineCell.swift分隔線
.../Home/V/BBMineAboutSportsCell.swift體育相關
.../Home/V/BBBalacnceTableViewCell.swift餘額列表
.../Home/V/BenefitMemberTableViewCell.swift專屬客服列表

基礎路徑:BBSport/Tab/我的/

View — VIP / 其他(7 個)
檔案說明
.../Home/V/VIP/BBMineVipLogoutView.swiftVIP 登出
.../Home/V/VIP/BBMineVipMaxLevelView.swiftVIP 最高等級
.../Home/V/VIP/BBMineVipNormalView.swiftVIP 一般等級
.../Home/V/VIP/BBMineVipTagView.swiftVIP 標籤
.../Home/V/AgencyView.swift代理入口
.../Home/V/BBAccountMoneyLabel.swift金額 Label
.../Home/V/WebAlertView.swiftWeb 彈窗

基礎路徑:BBSport/Tab/我的/

View — 金幣餘額 / 任務(10 個)
檔案說明
.../Home/V/GoldBalance/BBMineGoldBalancePopupViewController.swift金幣餘額彈窗
.../Home/V/GoldBalance/BBMineGoldBalanceTableViewCell.swift金幣餘額 Cell
.../Mine/Tasks/V/BBDailyTaskView.swift每日任務
.../Mine/Tasks/V/MyDailyMySignCell.swift每日簽到
.../Mine/Tasks/V/MyDailyMySignInfoCell.swift簽到資訊
.../Mine/Tasks/V/MyDailyMySignRewardCell.swift簽到獎勵
.../Mine/Tasks/V/MyDailyTaskProgressBarView.swift任務進度條
.../Mine/Tasks/V/MyDailyTaskProgressBarWrapper.swift進度條包裝
.../Mine/Tasks/V/MyDailyTaskSubtitleView.swift任務副標題
.../Mine/Tasks/V/MyDailyTaskTitleView.swift任務標題

基礎路徑:BBSport/Tab/我的/

Model(8 個)
檔案說明
.../Home/M/BenefitMembersModel.swift專屬客服
.../Home/M/FinishTask.swift完成任務
.../Home/M/MyTask/STTaskCheckInModel.swift簽到任務
.../Home/M/MyTask/STTaskHomeModel.swift任務首頁
.../Home/M/PhotoCellViewModel.swift照片 Cell
.../Mine/Tasks/V/MyDailyTaskSummaryCell.swift任務總覽
.../Mine/Tasks/V/SignRuleAlertView.swift簽到規則彈窗
.../Mine/BottomMenu/M/BBFeedbackProblemModel.swift回饋問題

基礎路徑:BBSport/Tab/我的/

個人檔案(13 個)
檔案說明
.../PersonalProfile/View/BBPersonalProfileViewController.swift個人檔案
.../PersonalProfile/View/BBPersonalBetView.swift個人投注
.../PersonalProfile/View/BBPersonalProfileBetTableViewCell.swift投注 Cell
.../PersonalProfile/View/BBPersonalProfileHeaderView.swift個人 Header
.../PersonalProfile/View/BBPersonalProfileSwitchSectionView.swift切換區塊
.../PersonalProfile/View/BBPersonalTagCollectionViewCell.swift標籤 Cell
.../PersonalProfile/View/FansPage/V/FansPageSwitchTypeView.swift粉絲頁切換
.../PersonalProfile/View/FansPage/V/FansPageTableViewCell.swift粉絲頁 Cell
.../PersonalProfile/View/FansPage/V/FansPageViewController.swift粉絲頁
.../PersonalProfile/View/FansPage/VM/FansPageViewModel.swift粉絲頁 ViewModel
.../PersonalProfile/ViewModel/BBPersonalProfileBetTableViewCellModel.swift投注 Cell Model
.../PersonalProfile/ViewModel/BBPersonalProfileHeaderViewModel.swiftHeader ViewModel
.../PersonalProfile/ViewModel/BBPersonalProfileViewModel.swift個人檔案 ViewModel

基礎路徑:BBSport/Tab/我的/

稱號系統(8 個)
檔案說明
BBSport/Tools/UserTitleManager/UserTitleManager.swift稱號管理器
.../UserTitleWall/M/UserTitleWallModel.swift稱號牆 Model
.../UserTitleWall/VM/UserTitleWallViewModel.swift稱號牆 ViewModel
.../UserTitleWall/V/UserTitleWallBaseView.swift基礎視圖
.../UserTitleWall/V/UserTitleWallView.swift主視圖
.../UserTitleWall/V/SubViews/UserTitleWallContentView.swift內容視圖
.../UserTitleWall/V/SubViews/UserTitleWallTitleView.swift標題視圖
.../UserTitleWall/V/SubViews/ConditionProgressView.swift條件進度

基礎路徑:BBSport/Tools/UserTitleManager/

其他(5 個)
檔案說明
.../Mine/BottomMenu/C/BBVersionController.swift版本資訊
.../Mine/BottomMenu/V/BBPhotoImageView.swift照片預覽
.../Mine/BottomMenu/V/BBWriteMessageView.swift回饋留言
.../Mine/Others/M/BBCompetitionModel.swift競賽
.../Mine/Others/M/BBTransferModel.swift轉帳

基礎路徑:BBSport/Tab/我的/


API

個人資訊


個人資訊(看自己)

POST api/forehead/user/center/home — urlForm — STAPI

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
alreadyOpenBool是否開放個人主頁
alreadySubscriptionBool是否已關注
userCenterUserCenter用戶資訊
userTitleInfoUserTitleInfo用戶稱號資訊
userTitleWallUserTitleWallDataContainer稱號牆資訊
UserCenter 欄位
欄位型別說明
avatarString頭像 URL
nicknameString暱稱
usernameString用戶名
userIdInt用戶 ID
vipLevelIntVIP 等級(0~7)
lastWinAmountDouble最近盈利金額
lastWinCountInt最近盈利次數
totalFanInt粉絲數
totalSubscriptionInt關注數
totalHostInt主播數
totalProfessorInt專家數
showSwitchInt是否公開個人主頁

UserTitleInfo 欄位:pic(String), titleId(Int), titleIdList([Int]), titleSize(Int)

API Request 檔案:BBSport/API/STAPI/User/Profile/STAPI+ProfileInfoRequest.swift


個人資訊(看別人)

POST api/forehead/user/center/info — urlForm — STAPI

參數型別必填說明
userIdint目標用戶 ID

Response: 同「個人資訊(看自己)」。


金幣餘額

POST api/forehead/activity/goldmall/balance — urlForm — STAPI.GoldMallBalanceRequest

API Request 檔案:BBSport/API/STAPI/Activity/STAPI+GoldMallBalanceRequest.swift

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
coinBalanceInt用戶金幣餘額

未讀通知數

POST api/forehead/user/message/group/count — urlForm — STAPI.UserNoticeUnreadCountRequest

API Request 檔案:BBSport/API/STAPI/Notice/STAPI+UserNoticeUnreadCountRequest.swift

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
sysUnreadCountInt系統未讀數
actUnreadCountInt活動未讀數
matchUnreadCountInt賽事未讀數
amUnreadCountInt代理未讀數
comUnreadCountInt社區未讀數

活動領取狀態

POST api/forehead/activity/act/receive/info — urlForm — STAPI.ActivityActReceiveInfoRequest

API Request 檔案:BBSport/API/STAPI/STAPI+ActivityActReceiveInfoRequest.swift

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
goldMallCanReceiveBool金幣商城是否可領取
inviteCanReceiveBool好友邀請是否可領取
welfareCanReceiveBool福利中心是否可領取

充提狀態


提款最新狀態

POST api/forehead/fund/withdraw/last/status — urlForm — STAPI

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
bankCards[WithdrawBankModel]用戶銀行卡列表
telephoneString綁定的手機號
withdraws[WithdrawModel]提款記錄列表
receivedMoneyBool確認收款按鈕是否已按過
isC2CSplitWithdrawOpenBool是否開啟 C2C 拆單功能
totalFeeDoubleC2C 拆單手續費總合
currentStepInt進度條(1=申請, 2=等待付款, 3=待確認到帳, 4=提款完成)
activityMessageString提款超時補償文案

充值狀態

POST api/forehead/fund/recharge/status — POST — HttpService

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
orderIdString訂單號
amountDouble充值金額
statusInt訂單主狀態(0=待支付, 1=成功, 2=失敗, 3=補單審核中)
subStatusInt訂單子狀態
paymentNameString支付方式名稱
expiredTtlInt倒計時剩餘秒數

其他


專屬客服

POST api/forehead/system/proxy/config/contacts — urlForm — STAPI.UserContactBenefitMemberRequest

API Request 檔案:BBSport/API/STAPI/User/STAPI+UserContactBenefitMemberRequest.swift

無參數,靠 Header token/uid 認證。

Response: data: [BenefitMembersModel]

欄位型別說明
idIntID
nameString軟體名稱
contactString聯繫方式
iconString圖標
proxyNameString代理帳號
sortInt排序

運營位圖片

POST api/forehead/system/config/images/query — urlForm — STAPI.SystemConfigImagesRequest

API Request 檔案:BBSport/API/STAPI/STAPI+SystemConfigImagesRequest.swift

參數型別必填說明
categoryIdstring圖片分類 ID,多個以逗號分隔

Response: data 為 JSON 字串,解析為 RechargeOperateModel 陣列,含 images(URL)、actionContent(跳轉連結)、categoryId


TableView 結構

Section ↔ API 對照表

Section枚舉值說明數據來源 API
0orderProgress進行中訂單POST /withdraw/last/status + POST /recharge/status
1singInMy每日簽到進度POST /activity/act/receive/info + 簽到相關 API
2taskMy每日任務進度POST /activity/act/receive/info + 任務相關 API
3goldBalance金幣餘額POST /activity/goldmall/balance
4userInfo用戶資訊快捷入口POST /user/center/home
5banners活動 BannerPOST /system/config/images/query(categoryId=20101,20201
6separatorLine分隔線無(純 UI)
7aboutSports體育相關無(靜態入口)
8appInfoApp 資訊列表無(靜態入口)

活動 Banner

Banner 數據透過 STAPI.SystemConfigImagesRequest 取得,請求時傳入 categoryId:

  • 20101categoryId.gameOperate)— 遊戲運營位
  • 20201categoryId.mineBanner)— 個人中心輪播圖

返回 RechargeOperateModel 陣列,每筆含 images(圖片 URL)、actionContent(跳轉連結,透過路由系統解析跳轉目標)、categoryId

WebSocket OrderStatusID(12 種)

ID枚舉值說明
401rechargeSuccess會員充值成功
402withdrawSuccess會員提現成功
407rechargeFail會員充值失敗
408bonus紅利發放
413withdrawFail提現失敗
433c2cRechargePayTimeoutC2C 充值訂單付款超時
434c2cWithdrawPayReminderC2C 提現訂單付款提醒
435c2cRechargeReceiveTimeoutC2C 充值訂單收款超時
437c2cWithdrawReceiveTimeoutC2C 提現訂單收款超時
438c2cWithdrawConfirmedC2C 提現訂單被確認
439c2cEasterEggActivityStartC2C 彩蛋活動開始
445c2cWithdrawPayerCanceledC2C 提現訂單付款方取消

來源:BBMineViewController.OrderStatusID,收到推送後呼叫 getOrderStatus() 刷新充提狀態。充值成功額外刷新 Header 頂部餘額。


實作重點

  • 登入狀態:大部分操作需登入,未登入彈出登入提示
  • Header 動態高度:依登入狀態和訂單狀態調整;未登入 189pt、已登入 267pt 或 251pt
  • WebSocket 即時更新:監聽 STNotify.receivedSocketPush,依 OrderStatusID(充提相關 12 種)刷新
  • 客服氣泡:RxSwift 控制客服按鈕紅點和氣泡提示
  • 浮動球系統:管理多個浮動球(活動、新用戶轉盤),支援 jumpToPage 和 jumpToEntertainment;浮動球數據來自 categoryId=20105categoryIdOfBanner.homeMyCenter
  • 夜間模式:監聽 STNotify.nightPatternOpen,刷新所有 UI 顏色

關鍵數字

  • Header 未登入高度:189pt
  • Header 已登入高度:267pt / 251pt
  • WebSocket 充提推送 OrderStatusID:12 種