Migrate from iOS 17 Observation to iOS 16-compatible Combine architecture.
Lower deployment target to iOS 16, replace @Observable with ObservableObject, add navigation and UI compatibility shims, and include login smoke UI tests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -6,16 +6,15 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Observation
|
||||
import Combine
|
||||
|
||||
@MainActor
|
||||
@Observable
|
||||
/// 订单详情 ViewModel,负责加载门店订单详情并保留列表摘要兜底展示。
|
||||
final class OrderDetailViewModel {
|
||||
private(set) var detail: StoreOrderDetailResponse?
|
||||
private(set) var loading = false
|
||||
private(set) var errorMessage: String?
|
||||
private(set) var contextMessage: String?
|
||||
final class OrderDetailViewModel: ObservableObject {
|
||||
@Published private(set) var detail: StoreOrderDetailResponse?
|
||||
@Published private(set) var loading = false
|
||||
@Published private(set) var errorMessage: String?
|
||||
@Published private(set) var contextMessage: String?
|
||||
|
||||
/// 当前页面用于展示的订单信息,详情接口成功时优先使用详情数据。
|
||||
var display: StoreOrderDetailDisplay {
|
||||
|
||||
Reference in New Issue
Block a user