Phase 6 commit C:backgameData pop + getWebdata 反向 callback
- 新增 Source/Bridge/Handlers/BackGameDataHandler.swift(仅 SubGameViewController 注册):
- 调 AudioPlayer.stopAllBackground 停背景音
- AppCoordinator.popSubGame(returningData:) → popViewController + 发 .subGameDidReturn
- data 兼容 string / object(非字符串走 JSONSerialization 序列化透传)
- 字面 cb "backgameData"(msext gameController.m:691-709 等价,
WXApi 清理跳过 — 微信 SDK 待 Phase 4.E)
- AudioPlayer.stopAllBackground:无条件停背景音(msext 不看 type 直接 nil 行为)
- SubGameViewController.registerBridgeHandlers:挂上 BackGameDataHandler,
注释更新 exitRoom/getVideoinfo/createRoom 推迟到 Phase 8
- WebContainerViewController:在 setupExternalSubscriptions 挂 .subGameDidReturn
观察者 → bridge.call("getWebdata", .string(data)),teardown 时 removeObserver
(生命周期与 battery/network/appservice 同一对,子游戏栈顶时大厅已 teardown
避免双发)
- Plan §5.6.3 / 6.5 / 6.6 / §8 进度已勾选
至此 SwitchOverGameData → push 子游戏 → backgameData → pop + getWebdata
完整链路接通;子游戏视频房间(exitRoom/getVideoinfo/createRoom)留待 Phase 8。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
a9eaf86c63
commit
5f3a435180
@@ -83,8 +83,10 @@ public final class SubGameViewController: UIViewController {
|
||||
// OpenurlTitleData 在子游戏中也可能调(threeView 弹层 push 自子游戏页),保留 stub
|
||||
OpenurlTitleDataHandler.register(on: bridge)
|
||||
|
||||
// backgameData / exitRoom / getVideoinfo / createRoom 等子游戏专属 handler
|
||||
// 留待 commit C / 后续 Phase 接入。
|
||||
// 子游戏专属:backgameData(退出回大厅 + 反向 callback getWebdata)
|
||||
BackGameDataHandler.register(on: bridge)
|
||||
|
||||
// exitRoom / getVideoinfo / createRoom 等视频房间 handler 留待 Phase 8 接入
|
||||
}
|
||||
|
||||
// MARK: - 摇一摇支持
|
||||
|
||||
Reference in New Issue
Block a user