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 ScenicSettlementViewController: ModuleTableViewController {
private let amountField = UITextField()
private let remarkField = UITextField()
/// UI
override func viewDidLoad() {
title = "景区结算"
navigationItem.rightBarButtonItem = UIBarButtonItem(
@ -26,6 +27,7 @@ final class ScenicSettlementViewController: ModuleTableViewController {
wireViewModel(viewModel) { }
}
/// Header UI
private func setupHeader() {
amountField.placeholder = "结算金额"
amountField.borderStyle = .roundedRect
@ -41,20 +43,24 @@ final class ScenicSettlementViewController: ModuleTableViewController {
tableView.tableHeaderView = stack
}
/// tableCount
override func tableRowCount() -> Int {
viewModel.options.count
}
/// Cell
override func configureCell(_ cell: TitleSubtitleTableViewCell, at indexPath: IndexPath) {
let option = viewModel.options[indexPath.row]
cell.configure(title: option.name, subtitle: option.selected ? "已选择" : nil)
cell.accessoryType = option.selected ? .checkmark : .none
}
/// didSelectTableRow
override func didSelectTableRow(at indexPath: IndexPath) {
viewModel.toggleScenic(id: viewModel.options[indexPath.row].id)
}
/// Content
override func reloadContent() async {
await viewModel.load(
api: services.scenicPermissionAPI,
@ -62,6 +68,7 @@ final class ScenicSettlementViewController: ModuleTableViewController {
)
}
///
@objc private func submit() {
viewModel.amountText = amountField.text ?? ""
viewModel.remarkText = remarkField.text ?? ""
@ -83,23 +90,28 @@ extension ScenicSettlementViewModel: ViewModelBindable {}
final class ScenicSettlementReviewViewController: ModuleTableViewController {
private let viewModel = ScenicSettlementReviewViewModel()
/// UI
override func viewDidLoad() {
title = "结算审核"
super.viewDidLoad()
wireViewModel(viewModel) { }
}
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 ? viewModel.scenicApplications.count : viewModel.roleApplications.count
}
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
@ -122,6 +134,7 @@ final class ScenicSettlementReviewViewController: ModuleTableViewController {
return cell
}
/// Content
override func reloadContent() async {
await viewModel.load(api: services.scenicPermissionAPI)
}