Phase 6 commit A:AppCoordinator + SubGameViewController 框架 + SwitchOverGameData push
- AppCoordinator:2s 节流 + 栈深 < 2 守门 + .subGameDidReturn 通知名(Design §2.4.3) - SubGameViewController:复用 BridgedWebView/Splash/16:9 letterbox/ExternalSubscriptions, AppDataWriter(.subGame) 写 4 个 app_*.js;H5 未安装时抛错(待 commit B 接入下载) - SwitchOverGameHandler:解 Gamedirectory/gamedownloadurl/data → AppCoordinator.showSubGame (msext NewRootVC.m:541-566 等价,节流与栈深由 Coordinator 守门,cb 字面始终回) - SceneDelegate:UINavigationController 承载大厅,nav 引用交给 AppCoordinator - Plan 进度已勾选 §5 / §8(commit B/C 留待 SubGameDownloader 与 backgameData/getWebdata 链路) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
68cf7140d7
commit
7a5644053d
@@ -587,10 +587,11 @@ Contract Design Plan(本文档)
|
||||
|
||||
#### 任务清单
|
||||
|
||||
- [ ] **6.1** `Source/Coordinator/AppCoordinator.swift`:path 节流 + 栈深约束(Design §2.4.3)
|
||||
- [ ] **6.2** `Source/Containers/SubGameViewController.swift`:继承 WebContainer,注入 SubGameHandlers
|
||||
- [ ] **6.3** `Source/Bridge/Handlers/SubGameHandlers.swift`:19 共享 + `backgameData` + 3 个视频房间 stub
|
||||
- [ ] **6.4** `SwitchOverGameData` handler(仅大厅注册):解参 → AppCoordinator.showSubGame → 节流 2s
|
||||
- [x] **6.1** `Source/Coordinator/AppCoordinator.swift`:2s 节流(`lastSwitchAt`)+ 栈深约束(`viewControllers.count < 2`)+ `.subGameDidReturn` 通知名(Design §2.4.3)
|
||||
- [x] **6.2** `Source/WebView/SubGameViewController.swift`:与大厅同款 BridgedWebView + Splash + 16:9 letterbox + ExternalSubscriptions;`AppDataWriter(containerRole: .subGame)` 写 4 个 app_*.js;H5 未安装则抛 `SubGameBootError.subGameNotInstalled`(待 6.7 接入下载)
|
||||
- [ ] **6.3** `Source/Bridge/Handlers/SubGameHandlers.swift`:19 共享 + `backgameData` + 3 个视频房间 stub(commit C 接入 backgameData)
|
||||
- [x] **6.4** `SwitchOverGameData` handler(大厅 + 子游戏共用):解参 `Gamedirectory` / `gamedownloadurl` / `data` → `AppCoordinator.shared.showSubGame(...)`;节流 / 栈深守门移到 Coordinator,handler 始终回 cb `"SwitchOverGameData"`(msext NewRootVC.m:541-566 等价)
|
||||
- [x] **SceneDelegate**:以 `UINavigationController` 承载大厅,`AppCoordinator.shared.navigationController` 持引;导航栏隐藏 + 禁用边缘 pop 手势
|
||||
- [ ] **6.5** `backgameData` handler(仅子游戏注册):停 audio → 发 `.subGameDidReturn` 通知 → coordinator.popSubGame
|
||||
- [ ] **6.6** 大厅监听 `.subGameDidReturn` → `bridge.call("getWebdata", data)`
|
||||
- [ ] **6.7** 子游戏 zip 下载 / 解压(H5 端通过 SwitchOverGameData 传 `gamedownloadurl`)
|
||||
@@ -918,10 +919,10 @@ H5 调 `OpenurlTitleData` 打开弹层 WebView,弹层内 H5 用 `window.settin
|
||||
- [ ] 5.6 失败回包 errorCode 12
|
||||
|
||||
### Phase 6 子游戏
|
||||
- [ ] 6.1 AppCoordinator 栈深节流
|
||||
- [ ] 6.2 SubGameViewController
|
||||
- [ ] 6.3 SubGameHandlers
|
||||
- [ ] 6.4 SwitchOverGameData
|
||||
- [x] 6.1 AppCoordinator 栈深节流(2s + viewControllers.count < 2)
|
||||
- [x] 6.2 SubGameViewController 框架(commit A:H5 未安装则抛错,待 6.7 接入)
|
||||
- [ ] 6.3 SubGameHandlers(backgameData 留待 commit C)
|
||||
- [x] 6.4 SwitchOverGameData → AppCoordinator.showSubGame
|
||||
- [ ] 6.5 backgameData
|
||||
- [ ] 6.6 getWebdata 通知链
|
||||
- [ ] 6.7 SubGameDownloader
|
||||
|
||||
Reference in New Issue
Block a user