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:
@ -11,6 +11,7 @@ import UIKit
|
||||
final class WithdrawalAuditViewController: ModuleTableViewController {
|
||||
private let viewModel = WithdrawalAuditViewModel()
|
||||
|
||||
/// 视图加载完成后的 UI 初始化与数据绑定。
|
||||
override func viewDidLoad() {
|
||||
title = "提现审核"
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(
|
||||
@ -23,25 +24,30 @@ final class WithdrawalAuditViewController: ModuleTableViewController {
|
||||
wireViewModel(viewModel) { [weak self] in self?.updateFilterTitle() }
|
||||
}
|
||||
|
||||
/// table行Count相关逻辑。
|
||||
override func tableRowCount() -> Int {
|
||||
viewModel.filteredRecords.count
|
||||
}
|
||||
|
||||
/// 配置Cell展示内容。
|
||||
override func configureCell(_ cell: TitleSubtitleTableViewCell, at indexPath: IndexPath) {
|
||||
let record = viewModel.filteredRecords[indexPath.row]
|
||||
cell.configure(title: "¥\(record.amount)", subtitle: record.statusLabel, detail: record.createdAt)
|
||||
}
|
||||
|
||||
/// 刷新Content。
|
||||
override func reloadContent() async {
|
||||
await viewModel.reload(api: services.walletAPI)
|
||||
updateFilterTitle()
|
||||
}
|
||||
|
||||
/// willDisplayTableRow 回调处理。
|
||||
override func willDisplayTableRow(at indexPath: IndexPath) {
|
||||
guard indexPath.row >= viewModel.filteredRecords.count - 2 else { return }
|
||||
Task { await viewModel.loadMore(api: services.walletAPI) }
|
||||
}
|
||||
|
||||
/// cycle筛选相关逻辑。
|
||||
@objc private func cycleFilter() {
|
||||
let filters = WithdrawalAuditFilter.allCases
|
||||
guard let index = filters.firstIndex(of: viewModel.selectedFilter) else { return }
|
||||
@ -52,6 +58,7 @@ final class WithdrawalAuditViewController: ModuleTableViewController {
|
||||
}
|
||||
}
|
||||
|
||||
/// 更新FilterTitle状态。
|
||||
private func updateFilterTitle() {
|
||||
navigationItem.rightBarButtonItem?.title = viewModel.selectedFilter.title
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user