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:
@ -18,6 +18,7 @@ final class PaymentCollectionViewController: UIViewController {
|
||||
private let remarkField = UITextField()
|
||||
private let activityIndicator = UIActivityIndicatorView(style: .large)
|
||||
|
||||
/// 视图加载完成后的 UI 初始化与数据绑定。
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
title = "收款"
|
||||
@ -27,6 +28,7 @@ final class PaymentCollectionViewController: UIViewController {
|
||||
Task { await viewModel.loadPayCode(api: services.paymentAPI, scenicId: services.currentScenicId) }
|
||||
}
|
||||
|
||||
/// 初始化UI相关 UI 或状态。
|
||||
private func setupUI() {
|
||||
qrImageView.contentMode = .scaleAspectFit
|
||||
statusLabel.numberOfLines = 0
|
||||
@ -56,18 +58,21 @@ final class PaymentCollectionViewController: UIViewController {
|
||||
]
|
||||
}
|
||||
|
||||
/// render 业务逻辑。
|
||||
private func render() {
|
||||
qrImageView.image = viewModel.qrImage
|
||||
statusLabel.text = viewModel.errorMessage ?? String(describing: viewModel.status)
|
||||
if viewModel.isLoading { activityIndicator.startAnimating() } else { activityIndicator.stopAnimating() }
|
||||
}
|
||||
|
||||
/// apply金额相关逻辑。
|
||||
@objc private func applyAmount() {
|
||||
viewModel.amountText = amountField.text ?? ""
|
||||
viewModel.remarkText = remarkField.text ?? ""
|
||||
_ = viewModel.applyDynamicAmount()
|
||||
}
|
||||
|
||||
/// togglePolling相关逻辑。
|
||||
@objc private func togglePolling() {
|
||||
Task {
|
||||
await viewModel.pollUntilPaymentDetected(
|
||||
|
||||
Reference in New Issue
Block a user