Add login flow, session routing, and MainTab shell aligned with reference UI.
Implement token-based root routing, Android-matched login screen, five-slot MainTabBar with scan action, and placeholder tab pages. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
21
suixinkan/UI/MainTab/MainTabBadgeViewModel.swift
Normal file
21
suixinkan/UI/MainTab/MainTabBadgeViewModel.swift
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// MainTabBadgeViewModel.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// 主 Tab 角标 ViewModel,负责订单 Tab 待核销数量。
|
||||
final class MainTabBadgeViewModel {
|
||||
|
||||
var onChange: (() -> Void)?
|
||||
|
||||
private(set) var pendingWriteOffCount: Int? {
|
||||
didSet { onChange?() }
|
||||
}
|
||||
|
||||
/// 刷新待核销数量;接口未接入前保持为空。
|
||||
func refreshPendingWriteOffCount() {
|
||||
pendingWriteOffCount = nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user