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>
22 lines
447 B
Swift
22 lines
447 B
Swift
//
|
||
// 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
|
||
}
|
||
}
|