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

@ -10,6 +10,7 @@ import Foundation
@MainActor
/// 便 ViewModel
protocol PilotRealNameServing {
/// realNameInfo
func realNameInfo() async throws -> RealNameInfoResponse
}
@ -167,6 +168,7 @@ final class PilotCertificationViewModel {
flyer?.certificationLogs.last { $0.action == 2 || $0.action == 3 }
}
/// apply
private func apply(_ flyer: FlyerDetailResponse) {
self.flyer = flyer
name = flyer.name
@ -183,6 +185,7 @@ final class PilotCertificationViewModel {
uploadProgress = nil
}
/// uploadCertificate
private func uploadPendingCertificateImage(uploader: any OSSUploadServing, scenicId: Int?) async throws {
guard let data = pendingCertificateImageData else { return }
guard let scenicId, scenicId > 0 else {
@ -203,6 +206,7 @@ final class PilotCertificationViewModel {
pendingCertificateFileName = nil
}
/// ApplyRequest
private func makeApplyRequest() -> FlyerApplyRequest {
FlyerApplyRequest(
name: name.trimmedForPilot,
@ -219,6 +223,7 @@ final class PilotCertificationViewModel {
)
}
/// EditRequest
private func makeEditRequest() -> FlyerEditRequest {
let apply = makeApplyRequest()
return FlyerEditRequest(
@ -237,6 +242,7 @@ final class PilotCertificationViewModel {
)
}
/// statusName
private static func statusName(for status: Int) -> String {
switch status {
case 1: "审核中"
@ -254,6 +260,7 @@ final class PilotCertificationViewModel {
return formatter
}()
/// date
private static func date(from value: String) -> Date? {
let text = String(value.prefix(10))
guard !text.isEmpty else { return nil }
@ -261,9 +268,11 @@ final class PilotCertificationViewModel {
}
}
/// PilotEmptyRealName
private struct PilotEmptyRealNameServing: PilotRealNameServing {
let info: RealNameInfo?
/// realNameInfo
func realNameInfo() async throws -> RealNameInfoResponse {
RealNameInfoResponse(realNameInfo: info)
}