Appearance
資金明細
最後更新:2026-04-07
功能說明
資金明細讓已登入使用者查看帳戶的所有資金異動記錄,包含充值、提款、轉帳、投注輸贏、優惠活動等各類交易明細,支援按時間範圍(今天/昨天/7天內/30天內)和交易類型篩選。
使用者流程
- 進入「我的」→ 點擊「資金明細」→
CapitalListViewController - 頂部顯示帳戶總覽資訊
- Tab 切換時間範圍:今天 / 昨天 / 7天內 / 30天內(
TabSelectView) - 右上角篩選按鈕 →
CapitalScreenView按交易類型篩選 - 列表顯示,Cell 高度 64pt
- 點擊明細 →
CaptialDetailViewController查看詳情
頁面跳轉
- 「我的」首頁 → 資金明細 →
CapitalListViewController - 資金明細列表點擊明細 →
CaptialDetailViewController(詳情)
技術視角(開發看這裡)
相關檔案
| 類型 | 檔案路徑 |
|---|---|
| ViewController(列表) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/C/CapitalListViewController.swift |
| ViewController(詳情) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/C/CaptialDetailViewController.swift |
| ViewModel(列表) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/VM/CapitalListViewModel.swift |
| ViewModel(詳情) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/VM/CaptialDetailViewModel.swift |
| ViewModel(Cell) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/VM/BBCapitalCellViewModel.swift |
| API(交易類型列表) | /Users/user/Work/bbsport-new/BBSport/API/STAPI/CapitalDetail/STAPI+BalanceTypeListRequest.swift |
| ViewController(邀請好友) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/C/BBInvitamemberViewController.swift |
| ViewController(消息詳情) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/C/BBMessageDetailViewController.swift |
| ViewController(消息 Web) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/C/BBMessageWebViewController.swift |
| ViewController(回覆消息) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/C/BBReplayMessageViewController.swift |
| ViewController(贊助商) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/C/BBSponsorshipViewController.swift |
| ViewController(站內信) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/C/BBStationLetterViewController.swift |
| Model(資金詳情) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/BBCapitaDetailModel.swift |
| Model(通用資訊管理) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/BBGeneralInfoManager.swift |
| Model(收件箱) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/BBInboxModel.swift |
| Model(通知) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/BBNoticeModel.swift |
| Model(回覆通知) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/BBNoticeReplayModel.swift |
| Model(版本資訊) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/BBVersionInfoModel.swift |
| Model(提款拆單) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/BBWithDoawSplitModel.swift |
| Model(交易類型列表) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/CapitaTypeListModel.swift |
| Model(交易類型) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/CapitaTypeModel.swift |
| Model(交易狀態) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/M/TradingStatus.swift |
| View(站內信) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/BBLetterView.swift |
| Cell(消息) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/BBMessageCell.swift |
| View(消息列表) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/BBMessageListView.swift |
| View(資金篩選) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/CapitalScreenView.swift |
| Cell(詳情資訊) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/CaptialDetailInfoCell.swift |
| Cell(詳情列表) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/CaptialDetailTableViewCell.swift |
| View(Tab 選擇) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/TabSelectView.swift |
| View(交易狀態按鈕) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/TradingStatusButton.swift |
| View(交易類型按鈕) | /Users/user/Work/bbsport-new/BBSport/Tab/我的/Mine/MiddleMenu/V/TradingTypeButton.swift |
API
| 功能說明 | Namespace | Endpoint | Method | 主要參數 |
|---|---|---|---|---|
| 交易類型列表 | STAPI | api/forehead/data/balance/type/list | POST urlForm | 無 |
| 資金明細列表 | STAPI | (由 CapitalListViewModel 呼叫) | POST urlForm | 時間範圍、交易類型 |
資料模型
CapitaTypeModel(交易類型)
| 欄位 | 說明 |
|---|---|
type | 交易類型代碼 |
typeName | 類型名稱(充值/提款/投注等) |
篩選條件
| 條件 | 說明 |
|---|---|
| 時間範圍 | 今天/昨天/7天/30天(segementTitleArr) |
| 交易類型 | 從 CapitalScreenView 選擇(依 BalanceTypeListRequest 動態載入) |
實作重點
撤銷充值訂單:監聽
STNotify.cancelOrder→ 執行撤銷充值訂單邏輯夜間模式適配:監聽
STNotify.NIGHT_PATTERN_OPEN→ 更新空狀態圖示顏色分頁載入:Cell 高度固定 64pt;
CapitalListViewModel管理頁碼與請求狀態篩選器(CapitalScreenView):交易類型由
BalanceTypeListRequest動態取得,支援多選類型篩選
API 呼叫流程
進入資金明細頁 (CapitalListViewController)
viewWillAppear
├─ [並行] POST api/forehead/data/balance/type/list
│ → 交易類型列表 (充值/提現/轉帳/紅利/返水/...)
│
└─ [API] POST api/forehead/data/balance/list
{transactionType:14, startTime, endTime, transactionStatus:-1, page:1, size:100}
→ 交易記錄列表
transactionType: 1=充值, 2=提現, 3=轉帳, 4=紅利, 5=返水, 14=全部
transactionStatus: -1=全部, 0=處理中, 1=成功, 2=失敗篩選
日期: 今天 / 昨天 / 7天 / 30天 → 更新 startTime/endTime
類型: 從 BalanceTypeListRequest 動態取得 → transactionType
狀態: 全部/-1, 處理中/0, 成功/1, 失敗/2
└─ 篩選後 page=1 重新請求分頁
上拉載入更多 → page += 1
└─ 若 records < 10 → 自動再載入下一頁拆單詳情
用戶點擊拆單記錄 (extra.splitType == "1")
└─ [API] POST SplitOrderRequest {orderId}
→ 拆單子訂單明細 + 手續費