Add scenic application flow aligned with Android.
Implement scenic apply models, API, upload, UI, and tests; wire entry from permission apply pages and include related permission/scenic selection UI fixes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -17,6 +17,7 @@ final class ScenicSelectionViewModel {
|
||||
private(set) var spots: [ScenicSpotDisplayItem] = []
|
||||
private(set) var searchQuery = ""
|
||||
private(set) var currentLocationText = "最近的景区"
|
||||
private(set) var isLocating = false
|
||||
private(set) var isLoading = false
|
||||
|
||||
var onStateChange: (() -> Void)?
|
||||
@ -53,7 +54,7 @@ final class ScenicSelectionViewModel {
|
||||
}
|
||||
|
||||
func startLocation() async {
|
||||
isLoading = true
|
||||
isLocating = true
|
||||
notifyStateChange()
|
||||
do {
|
||||
let snapshot = try await locationProvider.requestSnapshot()
|
||||
@ -67,7 +68,7 @@ final class ScenicSelectionViewModel {
|
||||
} catch {
|
||||
onShowMessage?("定位失败: \(error.localizedDescription)")
|
||||
}
|
||||
isLoading = false
|
||||
isLocating = false
|
||||
notifyStateChange()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user