Integrate CYLTabBar center scan button and unify UIKit navigation.

Add CYLTabBarController with a global scan entry, promote MainTabBarController to the window root after login, replace RouterPath-based navigation with AppNavigator, and fix Profile diffable cell reconfiguration crashes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 16:36:18 +08:00
parent 24a7339b68
commit a1c031c9b7
31 changed files with 838 additions and 517 deletions

View File

@ -29,7 +29,7 @@ Home 模块负责登录后的首页工作台,包括当前景区展示、工作
- `unsupported`:已知 iOS 不支持的入口,进入占位说明。
- `placeholder`:未知或未迁移入口,记录诊断并进入占位说明。
`HomeView` 不创建自己的 `NavigationStack`,而是使用 Main Tab 注入的 `RouterPath` 进行页面跳转
`HomeMenuRouting` 只作为首页菜单到 `AppNavigator` 的适配层:本地业务页面沿当前 UIKit 导航栈 push订单和数据等一级入口交给导航器切换 Tab未迁移入口进入占位页
## 后续迁移

View File

@ -19,42 +19,16 @@ enum HomeMenuRouting {
let services = AppServices.shared
switch route {
case .tab(let tab):
services.appRouter.select(tab)
services.appNavigator.selectTab(tab)
case .orders(let entry):
services.appRouter.selectOrders(entry: entry)
services.appNavigator.openOrdersEntry(entry)
case .destination(let homeRoute):
push(homeRoute, from: viewController)
services.appNavigator.push(.home(homeRoute), from: viewController)
case .unsupported(let uri, let title, _):
pushPlaceholder(title: title, uri: uri, from: viewController)
services.appNavigator.push(.home(.modulePlaceholder(uri: uri, title: title)), from: viewController)
case .placeholder(let uri, let title):
HomeRouteDiagnostics.recordUnknown(uri: uri, title: title)
pushPlaceholder(title: title, uri: uri, from: viewController)
services.appNavigator.push(.home(.modulePlaceholder(uri: uri, title: title)), from: viewController)
}
}
/// Push
static func push(_ route: HomeRoute, from viewController: UIViewController) {
let target = AppRouteViewControllerFactory.makeViewController(for: route, services: AppServices.shared)
viewController.navigationController?.pushViewController(target, animated: true)
}
/// Push
static func pushOrders(_ route: OrdersRoute, from viewController: UIViewController) {
let target = AppRouteViewControllerFactory.makeViewController(for: .orders(route), services: AppServices.shared)
viewController.navigationController?.pushViewController(target, animated: true)
}
/// Push
static func pushProfile(_ route: ProfileRoute, from viewController: UIViewController) {
let target = AppRouteViewControllerFactory.makeViewController(for: .profile(route), services: AppServices.shared)
viewController.navigationController?.pushViewController(target, animated: true)
}
/// Push Placeholder
private static func pushPlaceholder(title: String, uri: String, from viewController: UIViewController) {
viewController.navigationController?.pushViewController(
FeaturePlaceholderViewController(title: title, uri: uri),
animated: true
)
}
}

View File

@ -368,7 +368,7 @@ final class HomeViewController: UIViewController {
///
@objc private func scenicTapped() {
HomeMenuRouting.push(.scenicSelection, from: self)
appServices.appNavigator.push(.home(.scenicSelection), from: self)
}
/// 线 / 线