feat: connect wild report risk map

This commit is contained in:
2026-07-08 17:52:29 +08:00
parent fd5dc2bbe6
commit 939295d74a
6 changed files with 1829 additions and 135 deletions
@@ -14,6 +14,10 @@ protocol WildPhotographerReportServing {
func submitReport(_ request: WildReportSubmitRequest) async throws
/// 为已有举报补充证据。
func supplementReport(_ request: WildReportSupplementRequest) async throws
/// 拉取附近风险地图点位。
func riskMap(_ request: WildReportRiskMapRequest) async throws -> WildReportRiskMapResponse
/// 拉取风险地图单个标记详情。
func markerDetail(_ request: WildReportMarkerDetailRequest) async throws -> WildReportMarkerDetailResponse
/// 拉取我的举报列表。
func reportList(_ request: WildReportListRequest) async throws -> WildReportListResponse
/// 拉取单条举报详情。
@@ -59,6 +63,28 @@ final class WildPhotographerReportAPI: WildPhotographerReportServing {
)
}
/// 拉取附近风险地图点位。
func riskMap(_ request: WildReportRiskMapRequest) async throws -> WildReportRiskMapResponse {
try await client.send(
APIRequest(
method: .post,
path: "/api/yf-handset-app/photog/report/risk-map",
body: request
)
)
}
/// 拉取风险地图单个标记详情。
func markerDetail(_ request: WildReportMarkerDetailRequest) async throws -> WildReportMarkerDetailResponse {
try await client.send(
APIRequest(
method: .post,
path: "/api/yf-handset-app/photog/report/marker-detail",
body: request
)
)
}
/// 拉取我的举报列表。
func reportList(_ request: WildReportListRequest) async throws -> WildReportListResponse {
try await client.send(
@@ -89,6 +115,36 @@ struct WildReportSupplementRequest: Encodable, Equatable {
let evidences: [WildReportEvidenceRequest]?
}
/// 附近风险地图接口请求体。
struct WildReportRiskMapRequest: Encodable, Equatable {
let scenicId: Int
let latitude: Double?
let longitude: Double?
enum CodingKeys: String, CodingKey {
case scenicId = "scenic_id"
case latitude
case longitude
}
}
/// 风险地图标记详情接口请求体。
struct WildReportMarkerDetailRequest: Encodable, Equatable {
let scenicId: Int
let markerType: String
let id: Int
let latitude: Double?
let longitude: Double?
enum CodingKeys: String, CodingKey {
case scenicId = "scenic_id"
case markerType = "marker_type"
case id
case latitude
case longitude
}
}
/// 提交举报接口请求体。
struct WildReportSubmitRequest: Encodable, Equatable {
let scenicId: Int