fix: 推送点击仅按 type 路由到收款页或消息中心。
对齐后端消息类型约定,去掉 route/uri 等兼容字段,并补充联调日志与单测。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -67,12 +67,7 @@ final class MainTabBarController: UITabBarController {
|
||||
|
||||
/// 响应推送点击,切换到目标 Tab 并打开对应业务页面。
|
||||
func openPushDestination(_ destination: PushDestination) {
|
||||
let targetTab: AppTab = switch destination {
|
||||
case .orders, .verificationOrders:
|
||||
.orders
|
||||
case .payment, .task, .queue, .messageCenter:
|
||||
.home
|
||||
}
|
||||
let targetTab = AppTab.home
|
||||
|
||||
selectTab(targetTab)
|
||||
guard let navigationController = tabNavigationControllers[targetTab] else { return }
|
||||
@ -80,16 +75,12 @@ final class MainTabBarController: UITabBarController {
|
||||
|
||||
let controller: UIViewController?
|
||||
switch destination {
|
||||
case .payment:
|
||||
case .paymentRecord:
|
||||
controller = PaymentCollectionRecordViewController()
|
||||
case .paymentDetails:
|
||||
controller = PaymentCollectionDetailsViewController()
|
||||
case .task:
|
||||
controller = TaskAddViewController()
|
||||
case .queue:
|
||||
controller = ScenicQueueViewController()
|
||||
case .messageCenter:
|
||||
controller = MessageCenterViewController()
|
||||
case .orders, .verificationOrders:
|
||||
controller = nil
|
||||
}
|
||||
|
||||
if let controller {
|
||||
|
||||
Reference in New Issue
Block a user