feat: 更新素材管理和举报风险地图

This commit is contained in:
2026-07-09 12:20:02 +08:00
parent 9b92d81902
commit 42aca73588
42 changed files with 6164 additions and 1369 deletions
@@ -17,12 +17,19 @@ struct HomeLocationSnapshot: Sendable, Equatable {
protocol LocationProviding: Sendable {
/// 请求当前坐标与地址。
func requestSnapshot() async throws -> HomeLocationSnapshot
/// 请求当前坐标。
func requestCoordinate() async throws -> CLLocationCoordinate2D
/// 按指定精度请求当前坐标。
func requestCoordinate(desiredAccuracy: CLLocationAccuracy) async throws -> CLLocationCoordinate2D
/// 逆地理编码。
func reverseGeocode(latitude: Double, longitude: Double) async -> String
}
extension LocationProviding {
/// 请求当前坐标,默认使用最高精度以保持既有业务行为。
func requestCoordinate() async throws -> CLLocationCoordinate2D {
try await requestCoordinate(desiredAccuracy: kCLLocationAccuracyBest)
}
}
/// 定位错误。
enum LocationProviderError: LocalizedError, Equatable {
case privacyNotAccepted