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

@ -13,6 +13,7 @@ final class PilotCertificationViewController: ModuleTableViewController {
private let viewModel = PilotCertificationViewModel()
private let statusLabel = UILabel()
/// UI
override func viewDidLoad() {
title = "飞手认证"
navigationItem.rightBarButtonItem = UIBarButtonItem(
@ -26,6 +27,7 @@ final class PilotCertificationViewController: ModuleTableViewController {
wireViewModel(viewModel) { [weak self] in self?.updateHeader() }
}
/// Header UI
private func setupHeader() {
statusLabel.numberOfLines = 0
statusLabel.font = .systemFont(ofSize: 14)
@ -34,17 +36,21 @@ final class PilotCertificationViewController: ModuleTableViewController {
tableView.tableHeaderView = statusLabel
}
override func numberOfSections(in tableView: UITableView) -> Int { 2 }
/// section
override func numberOfTableSections() -> Int { 2 }
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
/// section
override func tableRowCount(in section: Int) -> Int {
section == 0 ? formRows.count : 1
}
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
/// section
override func tableSectionTitle(for section: Int) -> String? {
section == 0 ? "认证信息" : "操作"
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
/// Cell
override func tableCell(for indexPath: IndexPath, row: ModuleTableRow, in tableView: UITableView) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(
withIdentifier: TitleSubtitleTableViewCell.reuseIdentifier,
for: indexPath
@ -58,8 +64,8 @@ final class PilotCertificationViewController: ModuleTableViewController {
return cell
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
///
override func didSelectTableRow(at indexPath: IndexPath) {
if indexPath.section == 1 {
Task {
do {
@ -72,11 +78,13 @@ final class PilotCertificationViewController: ModuleTableViewController {
}
}
/// Content
override func reloadContent() async {
await viewModel.load(api: services.pilotCertificationAPI, realNameAPI: services.profileAPI)
updateHeader()
}
///
@objc private func submit() {
Task {
do {
@ -102,6 +110,7 @@ final class PilotCertificationViewController: ModuleTableViewController {
]
}
/// Header
private func updateHeader() {
let status = viewModel.auditStatusText
statusLabel.text = "状态:\(status)\n\(viewModel.statusMessage ?? "")"