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

@ -104,6 +104,7 @@ final class LiveManagementViewModel {
await reload(api: api, scenicId: scenicId, showLoading: false)
}
/// Page
private func loadPage(api: any LiveServing, scenicId: Int, page: Int) async throws {
let response = try await api.liveList(scenicId: scenicId, page: page, pageSize: pageSize)
if page == 1 {
@ -118,6 +119,7 @@ final class LiveManagementViewModel {
hasMore = items.count < total
}
///
private func reset() {
clearListAndDetail()
loading = false
@ -125,6 +127,7 @@ final class LiveManagementViewModel {
errorMessage = nil
}
///
private func clearListAndDetail() {
items = []
detail = nil
@ -143,6 +146,7 @@ final class LiveDetailViewModel {
var actionInFlight = false { didSet { onChange?() } }
var errorMessage: String? { didSet { onChange?() } }
///
init(detail: LiveEntity) {
self.detail = detail
}
@ -265,6 +269,7 @@ final class LiveAlbumViewModel {
await reload(api: api, scenicId: scenicId, showLoading: false)
}
/// Page
private func loadPage(api: any LiveServing, scenicId: Int, page: Int) async throws {
let response = try await api.liveAlbumList(
scenicId: scenicId,
@ -284,6 +289,7 @@ final class LiveAlbumViewModel {
hasMore = folders.count < total
}
///
private func reset() {
clearFolders()
loading = false
@ -291,6 +297,7 @@ final class LiveAlbumViewModel {
errorMessage = nil
}
/// Folders
private func clearFolders() {
folders = []
page = 1
@ -377,6 +384,7 @@ final class LiveAlbumPreviewViewModel {
var loading = false { didSet { onChange?() } }
var errorMessage: String? { didSet { onChange?() } }
///
init(folderId: Int, startIndex: Int = 0, summary: LiveAlbumFolderItem? = nil) {
self.folderId = folderId
currentIndex = max(startIndex, 0)