Appearance
遊戲大廳
最後更新:2026-04-09
功能說明
遊戲 Tab 是娛樂遊戲入口,提供電子遊藝(老虎機/捕魚/電子)、彩票(PK拾/大樂透/六合彩等)、真人荷官、電競、棋牌等多種遊戲類型。頁面頂部有廣告 Banner 和大轉盤活動入口,遊戲以卡片形式展示分類。
使用者流程
- 點擊「遊戲」Tab →
BBHomeViewController - 頂部 Banner 輪播廣告(
SDCycleScrollView) - 大轉盤浮動入口(依後台活動設定顯示)
- 遊戲卡片區域(
HomeAllGameModel陣列) - 點擊遊戲卡片 → 跳轉對應遊戲(依遊戲類型路由)
- 搜索按鈕 →
BBSearchSubGameViewController(子遊戲搜索) - 彩票入口 →
MLLobbyMainViewController(彩票大廳) - 子遊戲列表 →
BBSubGameViewController
頁面跳轉
- 點擊「遊戲」Tab →
BBHomeViewController - 彩票入口 →
MLLobbyMainViewController - 遊戲卡片點擊 → 對應遊戲頁(依遊戲類型)
- 搜索按鈕 →
BBSearchSubGameViewController - 大轉盤 → 依活動
jumpUrl動態跳轉
遊戲啟動完整流程
使用者點擊遊戲卡片
│
├─ recommendType == 1 → 提示「遊戲暫未開放,敬請期待」→ 結束
│
├─ isMaintenance == true → 顯示維護彈窗(維護時間 + 客服入口)→ 結束
│
├─ 未登入 → 彈出登入提示 → 導向登入頁 → 結束
│
└─ 已登入 → 呼叫 GameJumpPreCheckRequest(檢查首次充值)
│
├─ transferAvailable == false → 彈窗「尚未完成首次充值,體驗金不能在體育之外投注」
│ ├─ 點「先去看看」→ 繼續進入遊戲
│ └─ 點「立即充值」→ 開啟充值頁
│
└─ transferAvailable == true → 繼續
│
├─ subGameNum > 1 → ExperCashHelper 彈窗 → push BBSubGameViewController
│
├─ gameId == 28(彩票)→ MGJRouter 開啟彩票模組
│
└─ 其他遊戲 → ExperCashHelper 彈窗 → JumpGameUrlRequest 取得 URL
│
└─ TransferInfoRequest 取得錢包資訊
│
└─ BBWalletService.finishedOnceTranser(一鍵轉帳)
│
├─ URL 是 http 開頭 → 外部瀏覽器開啟
├─ URL 是 HTML 字串 → WKWebView 載入(PG 電子)
└─ 一般遊戲 → push IFNewStaticWebViewController(內嵌 WebView)遊戲維護處理
- 維護資料來源:
STAPI.ProductConfigRequest取得所有平台維護狀態;Socket 推送即時維護通知(STNotify.maintainID) - 維護判斷:
BBHomeOtherHandler.requestProductConfig()解析BBUserProductConfigModel,比對maintenId更新每張遊戲卡片的維護狀態 - 維護顯示:卡片上顯示維護標記(
refreshMaintainStatu);點擊維護中的遊戲 → 彈窗顯示維護時間和客服入口 - 全域維護管理:
GameMaintenanceManager.shared管理 app / fb / db / up 四個平台的維護狀態 - IP 限制:全域 IP 限制(
ipLimit)和遊戲 IP 限制(gameIpLimit)分開處理
未登入使用者行為
| 場景 | 行為 |
|---|---|
| 點擊遊戲卡片 | PushGameService 檢查 isLoginThisPlatform,未登入 → STNormalAlertView.showLoginAlertView → STLoginManager.commonLogin() |
| 遊戲首頁 viewWillAppear | 未登入時不呼叫 getMoneyData()、getAllUnReadCount()、getUserUnReadCountHander() |
| 跳轉體育 App 按鈕 | BBGotoSportAPPView 檢查 isLoginThisPlatform,未登入 → 登入彈窗 |
| 導航列餘額/訊息 | BBUserHomeNavView 依登入狀態決定是否顯示餘額和訊息數 |
| 新人轉盤 | HomeNewUserSpinHandle 檢查 isLoginThisPlatform == true 才觸發 |
技術視角(開發看這裡)
相關檔案
| 類型 | 檔案路徑 |
|---|---|
| ViewController(遊戲首頁) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBHomeViewController.swift |
| ViewController(子遊戲) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBSubGameViewController.swift |
| ViewController(搜索子遊戲) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBSearchSubGameViewController.swift |
| 遊戲跳轉服務 | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/PushGameService.swift |
| 維護狀態處理 | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBHomeOtherHandler.swift |
| Model(OC - 遊戲分類) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/HomeAllGameModel.h/.m |
| Model(OC - 遊戲項目) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/GameItemModel.h/.m |
| View(遊戲卡片) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/HomeCardView.swift |
| 維護管理器 | /Users/user/Work/bbsport-new/BBSport/Tools/MaintenanceManager/GameMaintenanceManager.swift |
| 維護狀態 Model | /Users/user/Work/bbsport-new/BBSport/Tools/MaintenanceManager/GameMaintenanceStatusModel.swift |
| ViewController(彩票大廳) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/综合大厅/C/MLLobbyMainViewController.swift |
| ViewController(彩票主頁) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/C/MLLotteryMainViewController.swift |
| ViewController(快速投注) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/C/LFastBetViewController.swift |
| ViewController(開獎詳情) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/开奖/C/MLRunLotteryDetailViewController.swift |
| ViewController(投注記錄) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注记录/C/MLBetHistoryMainViewController.swift |
| ViewController(彩票管理) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票管理/C/MLLotteryManageMainViewController.swift |
| 彩票網路層 | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Networking/MLLTHttpService.swift |
| 彩票 API Action 定義 | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Networking/MLLotteryPlatformRequestAction.swift |
| 彩票 Request Info | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Networking/MLLotteryPlatformRequestInfo.swift |
| API(轉盤) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/API/STAPI+WheelList.swift |
| API(轉盤獲取) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/API/STAPI+WheelGet.swift |
| API(轉盤資訊) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/API/STAPI+WheelInfo.swift |
| API(轉盤用戶資訊) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/API/STAPI+WheelUserInfo.swift |
| Model(Banner) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/BBUserBannerModelItem.swift |
| Helper(轉帳工具) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/BBZhuanZhangTool.swift |
| Handler(大轉盤) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBHomeDaZhuanPanHander.swift |
| Handler(登入登出) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBHomeLoginOrLogoutHander.swift |
| Handler(公告顯示) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBHomeNoticeShower.swift |
| Handler(滾動處理) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBHomeScrollHaner.swift |
| Handler(主題樣式) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBHomeThemeStyleHandle.swift |
| Handler(網路請求) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/BBNetworkHander.swift |
| Handler(新人轉盤) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/HomeNewUserSpinHandle.swift |
| ViewController(靜態 WebView,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/controller/IFNewStaticWebViewController.m |
| Model(對話框) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/BBUserDialogModel.swift |
| Model(基礎 Model,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/BBUserGLBaseModel.m |
| Model(首頁 TableView,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/BBUserIndexTableViewModel.m |
| Model(訊息,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/BBUserMessageVmodel.m |
| Model(金額明細,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/BBUserMoneyDetailModel.m |
| Model(公告) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/BBUserNoticeModel.swift |
| Model(產品設定,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/BBUserProductConfigModel.m |
| Model(系統訊息,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/BBUserSystemMessageModel.m |
| Model(AG 遊戲) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/IFAGGameModel.swift |
| Model(主菜單項,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/MainItemModel.m |
| Model(獎品,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/PrizeModel.m |
| Model(系統公告列表,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/model/SystemNoticeListModel.m |
| Cell(AG 遊戲) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBAGGameCell.swift |
| Cell(代理公告) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBAgentNoticeCell.swift |
| Model(代理公告) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBAgentNoticeModel.swift |
| View(跳轉體育 APP) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBGotoSportAPPView.swift |
| View(體育 Banner) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBHomeSportBanner.swift |
| View(下拉刷新動畫) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBRefreshGifHeader.swift |
| View(子遊戲選擇欄) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBSubGameChooseBar.swift |
| View(子遊戲導航) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBSubGameVCNav.swift |
| Cell(直播) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBUserCustomLiveCell.swift |
| Cell(賽事) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBUserCustomMatchCell.swift |
| Cell(公告) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBUserCustomNoticeCell.swift |
| View(每日公告) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBUserEverydayNoticeView.swift |
| View(首頁導航) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBUserHomeNavView.swift |
| View(金額標籤) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBUserMonyLabel.swift |
| Helper(Swift-OC 橋接,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/BBUserSwiftOCAdapter.m |
| View(遊戲卡片項目) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/CarItemView.swift |
| View(跑馬燈,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/HornLabel.m |
| View(跑馬燈容器,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/HornView.m |
| View(新人轉盤遮罩) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/NewUserSpinOverlay.swift |
| View(新人轉盤) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/NewUserSpinView.swift |
| View(頁面指示器) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/SCPageControl/Classes/SCPageControlView.swift |
| View(自動滾動標籤,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/view/SKAutoScrollLabel/SKAutoScrollLabel.m |
| View(新公告) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/公告控件/BBNewNoticeView.swift |
| ViewController(彩票基底 Playing) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/C/MLBasePlayingViewController.swift |
| ViewController(K3 玩法) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/C/MLK3PlayingViewController.swift |
| ViewController(六合彩投注) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/C/MLLHCBetViewController.swift |
| ViewController(普通玩法) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/C/MLNormalPlayingViewController.swift |
| ViewController(PCDD 玩法) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/C/MLPCDDPlayingViewController.swift |
| ViewController(投注單) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/投注单/C/MLBetOrderViewController.swift |
| ViewController(智能追號) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/智能追号/C/MLIntelligenTrackViewController.swift |
| ViewController(投注記錄詳情) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注记录/C/MLBetHistoryDetailViewController.swift |
| ViewController(盈虧記錄) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票管理/C/MLProfitAndLossRecord.swift |
| ViewController(設定中心) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票管理/C/MLSettingCenterViewController.swift |
| ViewController(彩票 WebView) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票管理/C/MLWebViewController.swift |
| ViewController(走勢圖) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/LotteryChart/VC/LotteryChartViewController.swift |
| ViewController(錯誤頁面) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/错误页面/MLErrorViewController.swift |
| ViewController(彩票導航) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/Main/LTNavigationViewController.swift |
| ViewController(彩票 TabBar) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/Main/LTTabbarController.swift |
| ViewController(彩票基底) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Base/MLBaseViewController.swift |
| ViewModel(走勢圖資料) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/LotteryChart/VM/LotteryChartDataViewModel.swift |
| ViewModel(走勢圖) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/LotteryChart/VM/LotteryChartViewModel.swift |
| ViewModel(走勢遊戲模型) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/LotteryChart/VM/LotteryGameModelViewModel.swift |
| ViewModel(六合彩) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/普彩奖期/VM/MLLHCViewModel.swift |
| ViewModel(彩票獎期) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/普彩奖期/M/MLLotteryDrawPeriodViewModel.swift |
| ViewModel(盈虧列表) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票管理/M/MLProfitListViewModel.swift |
| Model(走勢圖資料) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/LotteryChart/M/MLChartDataModel.swift |
| Model(快速投注可選列表) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/FastBetOptionalListModel.swift |
| Model(百家樂投注) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/LotteryBJLBetInModel.swift |
| Model(百家樂投注模型) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/LotteryBaccaratBetModel.swift |
| Model(彩票首頁 Banner) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/LotteryHomeBannerModel.swift |
| Model(彩票群組) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/MLLotteryGroupModel.swift |
| Model(彩票玩法方式) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/MLLotteryPlayingMethodModel.swift |
| Model(PCDD 本地) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/MLPCDDLocalModel.swift |
| Helper(選號拼接) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/MLSelectNumbersJointer.swift |
| Helper(玩法選擇器建構) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/MLPlayingPickerModelCreater.swift |
| Helper(快樂彩選擇器建構) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票/M/MLHanppyPlayingPickerModelCreater.swift |
| Model(六合彩號碼) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/开奖/M/HK6CJNumberModel.swift |
| Model(開獎結果) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/开奖/M/RunLotteryModel.swift |
| Model(投注模型) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/投注单/M/MLBetModel.swift |
| Model(投注單模型) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/投注单/M/MLBetOrderModel.swift |
| Model(購物車) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/投注单/M/MLLTShoppingCart.swift |
| Model(追號) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/智能追号/M/MLChaseModel.swift |
| Model(投注記錄) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注记录/M/MLBetHistoryModel.swift |
| Model(追號號碼) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注记录/M/MLChaseNumberModel.swift |
| Model(彩票用戶) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票管理/M/MLLTUser.swift |
| Model(盈虧) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/彩票管理/M/MLProfitModel.swift |
| Model(單期開獎) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/普彩奖期/M/MLLotterySingleDrawModel.swift |
| Model(六合彩玩法多碼) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/普彩奖期/M/六合彩/MLPlayMultiModel.swift |
| Model(六合彩賠率碼) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/普彩奖期/M/六合彩/MLPriceCodeModel.swift |
| Service(彩票跳轉管理) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Networking/MLLTJumpManager.swift |
| Config(HTTP 錯誤碼) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Networking/MLLTHttpErrorCode.swift |
| Manager(六合彩投注) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLLHCBetManager.swift |
| Manager(Socket) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLSocketManager.swift |
| Helper(投注算法) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Algorithm/MLAlgorithmObject.swift |
| Helper(注數計算) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Algorithm/MLBetCountAlgorithObject.swift |
| Helper(K3 算法) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Algorithm/MLK3AlgorithObject.swift |
| Helper(單式篩號) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Algorithm/MLSimplexBetScreenNumberObject.swift |
| Helper(頁面路由) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLPageRouter.swift |
| Helper(規則說明) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLLTCommonRuleHelper.swift |
| Helper(群組碼) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLLTGroupCode.swift |
| Helper(彩票資訊) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLLTLotteryInfomation.swift |
| Helper(冷熱碼) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLLostColdCode.swift |
| Helper(狀態碼) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLStatusCode.swift |
| Helper(生肖) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLZodiacHelper.swift |
| Helper(輸入標題) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLInputCaptionHelper.swift |
| Protocol(投注協議) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Protocol/MLLTBetProtocol.swift |
| Config(走勢圖設定) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Config/LotteryChartSetingConfig.swift |
| Config(常數) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Config/LotteryCommonConstant.swift |
| Config(設定管理器) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Config/LotteryConfigManager.swift |
| Config(投注參數映射) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Config/MLBetParamMap.swift |
| Config(六合彩設定) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Config/MLLHCConfig.swift |
| Config(PCDD 設定) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Config/MLPCDDConfig.swift |
| View(遊戲引導) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/游戏引导/LTGameGuideView.swift |
| View(投注底部) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/投注单/V/MLBetBottomView.swift |
| View(投注視圖) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/投注单/V/MLBetView.swift |
| View(投注單彈窗) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/投注视图/MLBetOrderAlert.swift |
| View(單注投注條) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Features/投注/投注视图/MLSingleBetSlipView.swift |
| View(分段選擇) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLSegementView.swift |
| View(倒計時) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/CountDownView.swift |
| View(數字鍵盤) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/LTNumPadKeyboard.swift |
| View(Toast/HUD) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/LTToastHud.swift |
| View(Tab 切換) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/MLTabView.swift |
| Helper(Base Object) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Base/MLBaseObject.swift |
| View(Base TableView) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Base/MLBaseTableView.swift |
| Cell(Base TableViewCell) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Base/MLBaseTableViewCell.swift |
| View(Base View) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/Base/MLBaseView.swift |
| Helper(自訂彈窗工廠) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/CustomAlert/Base/MLCustomAlertFactory.swift |
| Helper(圖片快取) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/ImageLoader/LTImageCache.swift |
| Helper(圖片載入器) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/ImageLoader/LTImageLoader.swift |
| Helper(音效管理) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/Common/MLSoundManager.swift |
| Helper(通用工具,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/Common/MLCommonTools.m |
| Helper(通用 UI) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/Common/MLCommonUI.swift |
| Helper(Websocket STOMP,OC) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/Common/WebsocketStompKit.m |
| Extension(開獎號碼顏色) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/UIColor+OpenNumber.swift |
| Extension(TableView) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Helpers/MLTbaleViewExtension.swift |
| Extension(Dictionary) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Categories/Dictionary+KeyFroValue.swift |
| Extension(Double 小數) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Categories/Double+DecimalControl.swift |
| Extension(String MD5) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Categories/String+MD5.swift |
| Extension(Double) | /Users/user/Work/bbsport-new/BBSport/Tab/游戏/Amuse/Lottery/Classes/Utility/Common/MLDouble-Extension.swift |
| API(遊戲跳轉預檢) | /Users/user/Work/bbsport-new/BBSport/API/STAPI/Game/STAPI+GameJumpPreCheckRequest.swift |
| API(遊戲跳轉) | /Users/user/Work/bbsport-new/BBSport/API/STAPI/Game/STAPI+GameJumpRequest.swift |
| API(遊戲獎品列表) | /Users/user/Work/bbsport-new/BBSport/API/STAPI/Game/STAPI+GamePrizeListRequest.swift |
| API(遊戲投注設定查詢) | /Users/user/Work/bbsport-new/BBSport/API/STAPI/Game/STAPI+GamebetConfigQueryRequest.swift |
| API(首頁遊戲列表) | /Users/user/Work/bbsport-new/BBSport/API/STAPI/Game/STAPI+HomeGameListRequest.swift |
| API(遊戲 URL 跳轉) | /Users/user/Work/bbsport-new/BBSport/API/STAPI/Game/STAPI+JumpGameUrlRequest.swift |
| API(子遊戲列表) | /Users/user/Work/bbsport-new/BBSport/API/STAPI/Game/STAPI+ListSubGamesRequest.swift |
API
遊戲大廳核心 API
| 功能說明 | Request 類別 | Endpoint | Method | 主要參數 |
|---|---|---|---|---|
| 首頁遊戲列表 | HomeGameListRequest | api/forehead/gamebet/game/show/all | POST urlForm | showClient=2 |
| 子遊戲列表 | ListSubGamesRequest | api/forehead/gamebet/game/listSubGames | POST urlForm | channelId, subType, lineNum, gameType=3 |
| 遊戲跳轉(取 URL) | JumpGameUrlRequest | api/forehead/gamebet/game/jump | POST urlForm | gameId, mobileDisplayOrientation?, type=0 |
| 遊戲跳轉(小金登入) | GameJumpRequest | api/forehead/gamebet/game/jump | POST urlForm | gameId, type=0 |
| 遊戲跳轉前置檢查 | GameJumpPreCheckRequest | api/forehead/gamebet/game/jump/preCheck | POST urlForm | gameId |
| 遊戲圖示設定 | GamebetConfigQueryRequest | api/forehead/gamebet/config/query | POST urlForm | showClient=2 |
| 中獎名單 | GamePrizeListRequest | api/forehead/gamebet/game/list/prize | POST urlForm | gamePlatformId |
| 產品維護設定 | ProductConfigRequest | api/forehead/gamebet/product/productConfig | POST urlForm | isGame |
| 大轉盤活動列表 | WheelListRequest | api/forehead/activity/wheel/list | POST urlForm | 無 |
錢包轉帳相關 API
| 功能說明 | Request 類別 | Endpoint | Method | 主要參數 |
|---|---|---|---|---|
| 錢包餘額資訊 | TransferInfoRequest | api/forehead/gamebet/transfer/info | POST urlForm | 無 |
| 提交轉帳 | TransferSubmitRequest | api/forehead/gamebet/transfer/submitsync | POST urlForm | fromChannelId, toChannelId, amount, type |
| 各渠道餘額刷新 | RefreshByChannelRequest | api/forehead/gamebet/balance/refreshByChannel | POST urlForm | — |
彩票模組 API(Moya,獨立 baseURL)
彩票模組使用獨立的網路層 MLLotteryPlatformRequestInfo(基於 Moya),baseURL 由 MLLTJumpManager.shared.baseUrl 動態設定。
| 功能說明 | ActionType | Endpoint | Method |
|---|---|---|---|
| 遊戲菜單 | get_game_menu | wps/api/game-menu | GET |
| 熱門彩種 | get_hotLottery | wps/api/game-hot | GET |
| 玩法菜單 | get_play_menu | wps/api/play-menu | GET |
| 多玩法明細 | get_play_multi | wps/api/play-multi | GET |
| 單玩法明細 | get_play_single | wps/api/play-single | GET |
| 彩票規則 | get_common_rule | wps/api/common-rule | GET |
| 開獎歷史 | get_newest_result | wps/api/newest-result | GET |
| 單一開獎歷史 | get_single_newest_result | wps/api/single-newest-result | GET |
| 歷史記錄 | get_history | wps/api/history | GET |
| 投注 | bet | wps/api/bet | POST |
| 投注撤單 | bet_cancel | wps/api/bet-cancel | POST |
| 投注記錄 | get_bet_history | wps/api/bet-history | GET |
| 投注記錄詳情 | get_bet_history_order | wps/api/bet-history-order | GET |
| 追號投注 | chase_bet | wps/api/better-chase-bet | POST |
| 追號撤單 | chase_revoke | wps/api/chase-revoke | POST |
| 追號記錄 | get_chase_history | wps/api/chase-history | GET |
| 追號詳情 | get_chase_bet_history | wps/api/chase-bet-history | GET |
| 追號期號列表 | get_chase_result | wps/api/chase-result | GET |
| 追號起始期號 | get_chase_start_result | wps/api/chase-start-result | GET |
| 用戶餘額 | get_account_get | wps/api/account-get | GET |
| 設定中心 | config_center | wps/api/config-center | GET |
| 保存設定 | save_config_center | wps/api/save-config-center | POST |
| 多語言字段 | mul_lng_all_code | wps/api/game-i18n | GET |
| 六合彩生肖 | get_6cj_animal | wps/api/6cj/animal | GET |
| 日期盈虧統計 | get_report_data | wps/api/report/date | GET |
| 長龍分析 | get_analysis_long | wps/api/analysis/long | GET |
| 當期冷熱 | get_analysis_cold | wps/api/analysis/cold | GET |
| 走勢圖 | get_analysis_run | wps/api/analysis/run | GET |
| 當期遺漏 | get_analysis_lose | wps/api/analysis/lose | GET |
| 問路圖 | get_awDrawing | wps/api/down5 | GET |
| 快捷投注 | long_batch_bet | wps/api/long-batch-bet | POST |
| 首頁 Banner | get_ad_list | wps/api/ad-list | GET |
| 自選彩種設定 | get_optional_play_config | wps/api/optional-play-config | GET |
| 自選彩種列表 | get_optional_play_get | wps/api/optional-play-get | GET |
| 更新自選彩種 | get_optional_play_update | wps/api/optional-play-update | POST |
| Token 續期 | get_token_refresh | wps/api/token-refresh | GET |
| 全域設定 | merchant_config | wps/api/merchant-config | GET |
| 彩種說明 | get_game_desc | wps/api/game-desc | GET |
| 百家樂動畫 | baccarat | wps/api/baccarat-ani | GET |
資料模型
HomeAllGameModel(OC,支援 NSSecureCoding)
| 欄位 | 類型 | 說明 |
|---|---|---|
titleName | NSString | 分類標題(真人/電子/電競/彩票/棋牌) |
type | NSString | 分類類型鍵值(real/digital/gaming/lottery/poker) |
gameList | [GameItemModel] | 該分類下的遊戲項目陣列 |
imageKeyDay | NSString | 日間模式圖片 key |
imagesDay | NSString | 日間模式圖片 |
imageKeyNight | NSString | 夜間模式圖片 key |
imagesDayNight | NSString | 夜間模式圖片 |
actionContent | NSString | 動作內容 |
actionTitle | NSString | 動作標題 |
初始化時會過濾原生支援的 DB 體育(gameId != DBSportChannelID)。
GameItemModel(OC,支援 NSSecureCoding)
| 欄位 | 類型 | 說明 |
|---|---|---|
area | NSString | 顯示區域(1=導航欄 / 2=推薦位 / 3=轉帳錢包入口 / 4=首頁入口 / 5=平台商 logo) |
channelId | NSInteger | 渠道 ID |
descript | NSString | 描述 |
gameId | NSInteger | 遊戲 ID |
gameType | NSInteger | 遊戲類型(0=彩票 / 1=真人 / 2=體育 / 3=老虎機 / 4=捕魚 / 5=電競 / 6=棋牌) |
isCenterWallet | BOOL | 是否中心錢包(0=非 / 1=是) |
singleWallet | BOOL | 是否單一錢包 |
maintenId | NSInteger | 維護 ID(對應 ProductConfig 的 itemList) |
maintainType | MaintainType | 維護狀態枚舉(isMaintain / willMaintain / noMaintain / unknowMaintain) |
maintainStartDate | NSString | 維護開始時間 |
maintainEndDate | NSString | 維護結束時間 |
name | NSString | 遊戲名稱 |
navGroup | NSString | 導航分類 |
picUrl | NSString | 日間圖片 URL |
picUrlN | NSString | 夜間圖片 URL |
recommendType | NSInteger | 推薦角標類型(0=無 / 1=敬請期待 / 2=新上線 / 3=推薦) |
position | NSString | 顯示位置 |
subGameNum | NSInteger | 子遊戲數量 |
walletName | NSString | 錢包名稱 |
gamePlatform | NSInteger | 遊戲平台 ID |
popularity | NSString | 熱度值 |
toSafari | BOOL | 是否跳轉外部瀏覽器 |
HomeGameListRequest.Response(Swift,新版 API 回應)
| 欄位 | 類型 | 說明 |
|---|---|---|
nav | [HomeGame] | 導航列遊戲分類 |
recommend | [HomeGame] | 推薦遊戲分類 |
HomeGame
| 欄位 | 類型 | 說明 |
|---|---|---|
type | String | 分類類型 |
gameList | [HomeGameItem] | 遊戲列表 |
HomeGameItem
| 欄位 | 類型 | 說明 |
|---|---|---|
area | String | 顯示區域 |
channelId | Int | 渠道 ID |
descript | String | 描述 |
name | String | 遊戲名稱 |
gameId | Int | 遊戲 ID |
gameType | Int | 遊戲類型 |
isCenterWallet | Int | 是否中心錢包 |
singleWallet | Bool | 是否單一錢包 |
maintenId | Int | 維護 ID |
navGroup | String | 導航分類 |
picUrl | String | 圖片 URL |
position | Int | 位置 |
recommendType | Int | 推薦類型 |
walletName | String | 錢包名稱 |
subGameNum | Int | 子遊戲數量 |
popularity | String | 熱度值 |
GameJumpPreCheckRequest.Response
| 欄位 | 類型 | 說明 |
|---|---|---|
awardAmount | Int | 體驗金金額 |
transferAvailable | Bool | false 時彈窗提示首次充值(預設 true) |
userHasAwardAmount | Bool | 使用者是否有體驗金 |
userHasRecharge | Bool | 使用者是否已充值 |
GameMaintenanceStatusModel
| 欄位 | 類型 | 說明 |
|---|---|---|
isGameMaintenance | Bool(KVO) | 是否維護中 |
isShowH5 | Bool | 是否顯示 H5 地址 |
isShowBackBtn | Bool | 是否顯示返回按鈕 |
title | String | 維護標題 |
time | String | 維護時間文字 |
detail | String | 維護詳情文字 |
startDate | String | 維護開始時間 |
endDate | String | 維護結束時間 |
WheelListRequest.ResponseModel
| 欄位 | 類型 | 說明 |
|---|---|---|
id | Int | 活動 ID |
wheelId | Int | 轉盤 ID |
status | Int | 狀態(1=上架) |
startTime / endTime | Date? | 活動時間 |
mobilePic | String | 行動裝置圖片 URL |
floatPic | String | 浮動圖示 URL |
config | String | 活動設定 JSON 字串 |
實作重點
BBHomeViewController 佈局:
SDCycleScrollView廣告 Banner(寬度取整數避免自動滾動 Bug);HomeCardView遊戲卡片陣列;大轉盤跳轉 URL(jumpUrl)動態取得PushGameService 跳轉核心:整合
recommendType、維護狀態、登入狀態、GameJumpPreCheckRequest(首次充值檢查)四道關卡;ExperCashHelper.showAlertIfNeeded處理體驗金未綁定提示;subGameNum > 1時 pushBBSubGameViewController;gameId == 28時透過MGJRouter進入彩票模組錢包轉帳流程:進入遊戲前先
TransferInfoRequest取得錢包資訊 →BBWalletService.finishedOnceTranser一鍵轉帳 → 轉帳完成後才開啟遊戲頁;轉帳超時 3 秒後強制進入遊戲(DispatchQueue.main.asyncAfter)遊戲頁載體:一般遊戲使用
IFNewStaticWebViewController(內嵌 WKWebView);PG 電子返回 HTML 字串直接loadHTMLString;MW 捕魚使用外部瀏覽器(IFCommonUtil.openUrlStr);特殊 gameId(142/143)先選橫豎屏再打 game jump維護狀態同步:
BBHomeOtherHandler.requestProductConfig()在viewWillAppear時呼叫;解析BBUserProductConfigModel比對每張卡片的maintenId→ 更新卡片維護 UI(refreshMaintainStatu)GameMaintenanceManager 全域維護:管理 app / fb / db / up 四平台維護狀態;支援 Socket 即時推送(
STNotify.maintainID)和主動 API 查詢;APP 級維護時替換window.rootViewController為BBMaintainViewController彩票模組獨立性:彩票功能由
ML前綴類管理,使用 Moya 獨立網路層;MLBaseViewController為彩票模組基底 VC;LTNavigationViewController為彩票模組導航 VC;baseURL 由MLLTJumpManager.shared.baseUrl動態設定轉盤活動顯示邏輯:
status == 1且在startTime ~ endTime範圍內 → 顯示浮動轉盤入口遊戲啟動記錄:進入遊戲後
GameStatusManager.shared.updateSavedGameType(.bbAmuse),下次啟動 App 預設選中「遊戲」Tab彩票遊戲類型:PK拾 →
MLNormalPlayingViewController;K3 →MLK3PlayingViewController;六合彩 →MLLHCBetViewController;PCDD →MLPCDDPlayingViewController本地快取:遊戲列表使用
NSKeyedArchiver存入UserDefaults(key:GAME_ARRAY_LIST),下次啟動時先載入本地資料再請求 API 更新
API 呼叫流程
進入遊戲大廳 Tab (BBHomeViewController)
viewDidLoad
├─ [API 1] POST api/forehead/gamebet/game/show/all
│ → 遊戲分類 + 推薦列表 (快取至 GAME_ARRAY_LIST)
│
├─ [並行] POST api/forehead/system/config/images
│ → 分類圖片 (含深色/淺色主題)
│
├─ [並行] POST api/forehead/system/config/images {categoryId:"20108"}
│ → Banner 圖片
│
└─ [並行] POST api/forehead/gamebet/product/productConfig
→ 各遊戲維護狀態點擊遊戲啟動
CarItemView.didTap → PushGameService.pushToGame()
├─ 前置檢查:
│ ├─ 維護中? → 顯示維護提示
│ ├─ 已登入?
│ └─ [API] POST api/forehead/gamebet/game/jump/preCheck
│ → 首儲要求、紅利資格檢查
│
├─ 路徑 A: 有子遊戲 (subGameNum > 1)
│ └─ 推入 BBSubGameViewController
│ └─ [API] POST api/forehead/gamebet/game/listSubGames
│
├─ 路徑 B: 彩票 (gameId == 28)
│ └─ [API] POST api/forehead/gamebet/game/jump → 取得彩票平台 URL + token
│ └─ MLLTJumpManager.getMerchantConfig() → 彩票設定
│ └─ 轉帳 → 推入 LTTabbarController
│
└─ 路徑 C: 一般遊戲
├─ [API 1] POST api/forehead/gamebet/game/jump → 遊戲 URL
├─ [並行] POST api/forehead/gamebet/transfer/info → 錢包餘額
└─ [API 2] 自動轉帳 → 推入 WebView 載入遊戲錢包餘額轉帳 (BBWalletService)
BBWalletService.finishedOnceTranser()
├─ [API 1] POST api/forehead/gamebet/transfer/info → 所有錢包餘額
│
├─ [並行, 每個非中心錢包] POST api/forehead/gamebet/transfer/submitsync
│ {from: 遊戲錢包, to: 0(中心)} → 全部回收至中心
│
└─ [API 2] POST api/forehead/gamebet/transfer/submitsync
{from: 0(中心), to: 目標遊戲錢包} → 轉入目標遊戲
(3 秒逾時: 超時仍繼續啟動遊戲)