Advance UIKit rewrite with AMap integration and core UI modules.

Integrate高德 SDK with simulator-safe build flags, add map views for operating area and punch points, refactor main tabs and key feature screens to UIKit with Diffable lists, and document Swift concurrency defaults in AGENTS.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 15:16:12 +08:00
parent 9edf993432
commit d99a5b1bf8
124 changed files with 5195 additions and 1536 deletions

View File

@ -80,7 +80,7 @@ enum StatisticsPeriod: String, CaseIterable, Identifiable {
}
/// 退
struct StatisticsSummaryResponse: Decodable, Equatable {
struct StatisticsSummaryResponse: Decodable, Equatable, Hashable {
let orderAmountSum: String
let orderCount: Int
let orderPriceAverage: String
@ -92,6 +92,7 @@ struct StatisticsSummaryResponse: Decodable, Equatable {
var receivedAmountValue: Double { Self.parseAmount(receivedAmountSum) }
var refundAmountValue: Double { Self.parseAmount(refundAmountSum) }
///
enum CodingKeys: String, CodingKey {
case orderAmountSum = "order_amount_sum"
case orderCount = "order_count"
@ -125,6 +126,7 @@ struct StatisticsSummaryResponse: Decodable, Equatable {
refundAmountSum = try container.decodeLossyString(forKey: .refundAmountSum)
}
/// Amount
private static func parseAmount(_ text: String) -> Double {
let normalized = text.filter { "0123456789.-".contains($0) }
return Double(normalized) ?? 0
@ -132,7 +134,7 @@ struct StatisticsSummaryResponse: Decodable, Equatable {
}
/// 退
struct StatisticsDailyItem: Decodable, Identifiable, Equatable {
struct StatisticsDailyItem: Decodable, Identifiable, Equatable, Hashable {
var id: String { date }
let date: String
@ -145,6 +147,7 @@ struct StatisticsDailyItem: Decodable, Identifiable, Equatable {
var refundValue: Double { Self.parseAmount(refund) }
var receivedValue: Double { Self.parseAmount(received) }
///
enum CodingKeys: String, CodingKey {
case date
case orderCount = "order_count"
@ -163,6 +166,7 @@ struct StatisticsDailyItem: Decodable, Identifiable, Equatable {
received = try container.decodeLossyString(forKey: .received)
}
/// Amount
private static func parseAmount(_ text: String) -> Double {
let normalized = text.filter { "0123456789.-".contains($0) }
return Double(normalized) ?? 0