feat: update app workflows and permissions

This commit is contained in:
2026-07-09 17:34:00 +08:00
parent 43e6133c21
commit 8e356973bd
44 changed files with 2944 additions and 307 deletions

View File

@ -9,7 +9,7 @@
- 网络入口:`NetworkServices.shared.wildPhotographerReportAPI`
- 后端成功码:`100000`
- 响应包裹:工程统一 `APIEnvelope<T>`
- 当前状态:“首页文案”、“举报类型”、“提交举报”、“我的举报列表”、“举报详情”、“补充证据提交”和“附近风险地图”已接接口;模块内生产 Mock 数据已移除。
- 当前状态:“首页文案”、“举报类型”、“提交举报”、“我的举报列表”、“举报详情”、“微信小程序分享”、“补充证据提交”和“附近风险地图”已接接口;模块内生产 Mock 数据已移除。
## 首页文案
@ -334,7 +334,7 @@ struct WildReportListResponse: Decodable, Equatable {
### 用途
“举报详情”页面进入时调用。列表页传入 `WildReportRecord.serverID`,详情接口返回完整举报信息、现场证据、支付截图、补充内容和处理时间线。
“举报详情”页面进入时调用。列表页传入 `WildReportRecord.serverID`,详情接口返回完整举报信息、现场证据、支付截图、补充内容、处理信息和处理时间线。
### 请求
@ -358,7 +358,10 @@ GET /api/yf-handset-app/photog/report/detail?id=32
- `supplements` / `report_contents`:补充内容记录,优先使用 `supplements`,为空时从 `report_contents` 过滤 `type=supplement`
- `location_name` / `location_address`:详情页位置展示。
- `handle_status` / `handle_status_text`处理状态iOS 支持 0 待处理、1 处理中、2 已处理、3 驳回。
- `handle_remark`:处理备注,有值时在详情信息卡展示
- `handle_remark`:处理备注`handler.remark` 为空时作为“处理信息”卡的处理意见兜底
- `handler`:处理人结构,包含 `name``phone``started_at``finished_at``remark`,详情页“处理信息”卡优先使用。
- `handler_name` / `handler_phone` / `handled_at`:处理信息顶层兼容字段;`handler` 缺字段时作为兜底。
- `handle_evidences`:处理凭证附件数组,字段同证据附件,并额外支持 `evidence_kind` / `evidence_kind_text`
- `timeline`:处理进度时间线;为空时只展示列表记录中的当前处理状态,不生成本地模拟流程。
### iOS 模型
@ -366,6 +369,7 @@ GET /api/yf-handset-app/photog/report/detail?id=32
```swift
struct WildReportDetailData: Decodable, Equatable, Hashable
struct WildReportDetailEvidence: Decodable, Equatable, Hashable
struct WildReportDetailHandler: Decodable, Equatable, Hashable
struct WildReportDetailContent: Decodable, Equatable, Hashable
struct WildReportDetailTimelineItem: Decodable, Equatable, Hashable
```
@ -376,6 +380,9 @@ struct WildReportDetailTimelineItem: Decodable, Equatable, Hashable
- 如果传入记录没有 `serverID`,说明来自本地提交成功页等临时记录,不请求详情接口。
- 详情接口失败时保留现有基础信息,并 toast 错误。
- 图片证据使用 Kingfisher 加载网络图;视频证据展示视频样式缩略块和文件信息。
- 状态为已处理或驳回且存在处理信息时展示“处理信息”卡:处理人、处理人电话、处理时间、处理完成时间、处理意见。
- “处理人电话”展示脱敏文案,点击使用接口原始 `handler.phone``handler_phone` 发起 `tel://`
- `handle_evidences` 非空时在“处理信息”卡内展示“处理凭证”横向缩略图,`file_type=2` 按视频处理,其余按图片处理。
### 当前调用位置
@ -383,7 +390,62 @@ struct WildReportDetailTimelineItem: Decodable, Equatable, Hashable
- `WildPhotographerReportDetailViewModel.loadDetailIfNeeded(api:)`
- `WildPhotographerReportAPI.reportDetail(id:)`
## 5. 补充证据提交
## 5. 举报微信小程序分享
### 用途
“我的举报”列表卡片和“举报详情”头部点击分享时调用,后端按举报 ID 返回微信小程序分享配置iOS 映射为 `WeChatMiniProgramSharePayload` 后调用 `WeChatShareService.shareMiniProgram(...)`
### 请求
```http
GET /api/yf-handset-app/photog/report/share?id=32
```
### 请求参数
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `id` | string | 必填,举报记录服务端 IDiOS 使用 `WildReportRecord.serverID` |
### 响应示例
```json
{
"code": 100000,
"msg": "success",
"data": {
"userName": "wx8c85189bf3bdda29",
"path": "pages/scenic/radar/report-detail/index?id=32",
"title": "私下收款举报",
"imagePath": "/assets/share/report-share-cover.png",
"webpageUrl": "https://www.youfuntour.com",
"withShareTicket": true,
"miniprogramType": 0,
"scene": 0
},
"time": "2026-07-09 15:42:19"
}
```
### 字段说明
- `title`:微信分享卡片标题,不能为空。
- `webpageUrl`:小程序打不开时的兼容网页地址,微信要求不超过 1024 字节。
- `userName`:微信 SDK `WXMiniProgramObject.userName` 字段;请后端确认返回值是否应为小程序原始 ID `gh_...`
- `path`:小程序页面路径,可携带举报 ID 或分享 token。
- `miniprogramType`0 正式版、1 开发版、2 体验版;由后端按环境明确返回。
- `withShareTicket`:是否携带群分享票据。
- `scene`:当前仅支持 0 微信好友会话;非 0 会被通用微信分享模块拒绝。
- `imagePath`当前返回的是小程序内资源路径iOS 不下载;微信小程序预览图暂使用 App 图标兜底。若后续需要定制卡片图,请返回可下载的 `https` 图片地址。
### 当前调用位置
- `WildPhotographerReportListViewController` 列表卡片分享按钮
- `WildPhotographerReportDetailViewController` 详情头部分享按钮
- `WildPhotographerReportAPI.reportShare(id:)`
## 6. 补充证据提交
### 请求