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

@ -48,6 +48,7 @@ struct FlyerDetailResponse: Decodable, Equatable {
let realnameStatusText: String
let certificationLogs: [FlyerCertificationLogItem]
///
enum CodingKeys: String, CodingKey {
case id
case name = "flyer_nickname"
@ -72,6 +73,7 @@ struct FlyerDetailResponse: Decodable, Equatable {
case certificationLogs = "flyers_certification_logs"
}
///
init(
id: Int = 0,
name: String = "",
@ -118,6 +120,7 @@ struct FlyerDetailResponse: Decodable, Equatable {
self.certificationLogs = certificationLogs
}
///
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
id = try container.pilotDecodeLossyInt(forKey: .id) ?? 0
@ -155,6 +158,7 @@ struct FlyerCertificationLogItem: Decodable, Identifiable, Equatable {
let remark: String
let createdAt: String
///
enum CodingKeys: String, CodingKey {
case id
case flyerId = "flyer_id"
@ -166,6 +170,7 @@ struct FlyerCertificationLogItem: Decodable, Identifiable, Equatable {
case createdAt = "created_at"
}
///
init(
id: Int = 0,
flyerId: Int = 0,
@ -186,6 +191,7 @@ struct FlyerCertificationLogItem: Decodable, Identifiable, Equatable {
self.createdAt = createdAt
}
///
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
id = try container.pilotDecodeLossyInt(forKey: .id) ?? 0
@ -218,6 +224,7 @@ struct FlyerApplyRequest: Encodable, Equatable {
let contactPhone: String
let code: String
///
enum CodingKeys: String, CodingKey {
case name
case realnameStatus = "realname_status"
@ -248,6 +255,7 @@ struct FlyerEditRequest: Encodable, Equatable {
let contactPhone: String
let code: String
///
enum CodingKeys: String, CodingKey {
case id
case name
@ -277,6 +285,7 @@ enum PilotCertificationValidationError: LocalizedError, Equatable {
}
private extension KeyedDecodingContainer {
/// pilot
func pilotDecodeLossyString(forKey key: Key) throws -> String {
if let value = try? decodeIfPresent(String.self, forKey: key) {
return value
@ -293,6 +302,7 @@ private extension KeyedDecodingContainer {
return ""
}
/// pilot
func pilotDecodeLossyInt(forKey key: Key) throws -> Int? {
if let value = try? decodeIfPresent(Int.self, forKey: key) {
return value