feat(drone-dock): 接入图传与重召唤的本地模拟流程

新增 live 接口、状态展示和本地视频预览;支持同任务重新召唤、单次回查和防重,保留禁飞拦截。同步测试、模拟证据、后端接口确认文档及景区空境库范围约定。

验证:168 个相关用例最终均通过;最后复跑 38 项零失败。真实设备指令未发送。
This commit is contained in:
2026-11-02 09:49:17 +08:00
parent 2913273e35
commit c1fd2d0859
33 changed files with 3246 additions and 84 deletions
@@ -0,0 +1,52 @@
# 实时图传与重新召唤:本地模拟验证
日期:2026-10-30。iPhone 17 Pro / iOS 27 模拟器。
**用户再次确认当前禁飞。本目录全部接口回执为纯内存 Mock,`network_sent=false`;没有真实调用 `live/shoot`,没有创建真实待飞任务,也没有连接无人机。视频来自随包 `drone_material_demo.mp4`。**
## 当前实现
- `DroneDockLiveAPI`:`GET /api/app/airport/live?id=901`,解析现有文档字段、校验原订单任务身份。文档缺少播放协议及参数,不能据此建立真实图传。
- 图传区域支持加载、失败、缺参数与本地样片;注入本地文件后始终显示“本地模拟画面 · 未连接无人机”,离页或后台释放播放器;无定时轮询。正式入口不注入图传服务。
- `DroneDockShootAPI.resummon`:只发送 `{"id":901,"restart":true}`,不创建新任务、不传 `plane_id` 或覆盖航线。
- 重召唤成功后仅 `GET shooting` 一次,由同任务的新快照更新页面;在途保持旧读数和固定布局。连点防重、拒绝可手动重试,超时/取消/异常回执只允许核对,旧失败快照不会使同一请求重发。正式入口不注入重召唤服务。
- 原 `DeviceCommandDebugPolicy` 未改动,所有真实 `live/shoot/start-shoot/command` 仍在网络发送前拦截,无运行时放行开关。
## 启动方式
| 模拟场景 | 启动参数 |
| --- | --- |
| 失败后重新召唤 | `--dock-resummon-mock` |
| 拒绝/超时 | 加 `--dock-resummon-result=business-failure` 或 `timeout` |
| 图传本地视频 | `--dock-live-mock` |
| 缺参数/拒绝/超时 | 加 `--dock-live-result=missing-parameters`、`business-failure` 或 `timeout` |
| 同页验证两个功能 | `--dock-resummon-mock --dock-live-mock` |
这些参数只选择完全隔离的本地会话,不能解锁真实请求。
## 验证结果
累计 **168 个不同相关用例已取得通过结果**,涵盖新增 API、ViewModel、UI、现有开拍/控制、固定布局与禁飞保护。首轮 165/168 通过,3 个新 UI 用例误定位到隐藏的普通主按钮;改用失败页 `failureRetry` 后,相关 UI、固定布局和既有交互 **38 项复跑全部通过,0 失败、0 跳过**。最终模拟器构建通过,`git diff --check` 通过。
- 首轮结果包:`test_sim_2026-10-30T10-12-51-905Z_pid29946_b56e8f3b.xcresult`。
- 复跑结果包:`test_sim_2026-10-30T10-15-15-960Z_pid29946_11613c70.xcresult`。
- 下表 JSON 和缺参数截图导出自复跑用例附件;每份 JSON 都明确标记 `source=local_mock`、`network_sent=false`。
- 最终手动验证使用两个模拟启动参数:图传显示本地样片;点击失败页重召唤,原任务回查后展示“无人机已到达(模拟)”。未点击真实入口、未向网络转发。
| 场景 | 完整模拟回执 |
| --- | --- |
| 同一任务重召唤成功,单次 POST 后查询 | [resummon-success.mock.json](resummon-success.mock.json) |
| 明确拒绝后手动再试 | [resummon-rejected.mock.json](resummon-rejected.mock.json) |
| 超时后只读回查,不重复 POST | [resummon-timeout.mock.json](resummon-timeout.mock.json) |
| 图传已知字段 + 独立本地视频注入 | [live-success.mock.json](live-success.mock.json) |
| 仅文档现有字段,提示缺少播放参数 | [live-missing-parameters.json](live-missing-parameters.json) |
| 图传明确拒绝 | [live-rejected.mock.json](live-rejected.mock.json) |
| 图传超时 | [live-timeout.mock.json](live-timeout.mock.json) |
| 失败页与本地画面 | 重召唤后同任务状态 | 缺少真实播放参数 |
| --- | --- | --- |
| ![失败页与本地画面](before-resummon-local.jpg) | ![模拟重召唤回查](after-resummon-local.jpg) | ![缺少图传参数](live-missing-parameters.png) |
## 后端待确认
可直接转发工程根目录 [朱工-实时图传与重新召唤接口确认.md](../../../朱工-实时图传与重新召唤接口确认.md)。真实图传播放协议、凭证生命周期,以及重召唤权限、重启和幂等语义仍待补齐。本地验证不替代后端或真实设备验收,禁飞限制继续生效。
Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

@@ -0,0 +1,177 @@
{
"command_scenario" : "success",
"description" : "纯内存模拟,未调用后端或设备",
"network_sent" : false,
"records" : [
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : true,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "start_shoot",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"ui" : {
"commands" : [
{
"command" : "flighttask_pause",
"label" : "紧急暂停",
"sub" : "悬停待命"
},
{
"command" : "return_home",
"label" : "立即返航",
"sub" : "中断任务"
}
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "arrived_pending_start",
"title" : "无人机已到达(模拟)"
}
},
"msg" : "local mock success"
}
},
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/live",
"query" : "id=901",
"response_body" : {
"code" : 100000,
"data" : {
"airport" : {
},
"airport_sn" : "LOCAL-MOCK-DOCK-201",
"drone" : {
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task_id" : 901,
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
}
},
"msg" : "local mock success"
}
}
],
"scenario" : "success",
"source" : "local_mock"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 525 KiB

@@ -0,0 +1,148 @@
{
"command_scenario" : "success",
"description" : "纯内存模拟,未调用后端或设备",
"network_sent" : false,
"records" : [
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : true,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "start_shoot",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"ui" : {
"commands" : [
{
"command" : "flighttask_pause",
"label" : "紧急暂停",
"sub" : "悬停待命"
},
{
"command" : "return_home",
"label" : "立即返航",
"sub" : "中断任务"
}
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "arrived_pending_start",
"title" : "无人机已到达(模拟)"
}
},
"msg" : "local mock success"
}
},
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/live",
"query" : "id=901",
"response_body" : {
"code" : 100099,
"data" : {
},
"msg" : "本地模拟:图传连接不可用"
}
},
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/live",
"query" : "id=901",
"response_body" : {
"code" : 100099,
"data" : {
},
"msg" : "本地模拟:图传连接不可用"
}
}
],
"scenario" : "success",
"source" : "local_mock"
}
@@ -0,0 +1,177 @@
{
"command_scenario" : "success",
"description" : "纯内存模拟,未调用后端或设备",
"network_sent" : false,
"records" : [
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : true,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "start_shoot",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"ui" : {
"commands" : [
{
"command" : "flighttask_pause",
"label" : "紧急暂停",
"sub" : "悬停待命"
},
{
"command" : "return_home",
"label" : "立即返航",
"sub" : "中断任务"
}
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "arrived_pending_start",
"title" : "无人机已到达(模拟)"
}
},
"msg" : "local mock success"
}
},
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/live",
"query" : "id=901",
"response_body" : {
"code" : 100000,
"data" : {
"airport" : {
},
"airport_sn" : "LOCAL-MOCK-DOCK-201",
"drone" : {
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task_id" : 901,
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
}
},
"msg" : "local mock success"
}
}
],
"scenario" : "success",
"source" : "local_mock"
}
@@ -0,0 +1,134 @@
{
"command_scenario" : "success",
"description" : "纯内存模拟,未调用后端或设备",
"network_sent" : false,
"records" : [
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : true,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "start_shoot",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"ui" : {
"commands" : [
{
"command" : "flighttask_pause",
"label" : "紧急暂停",
"sub" : "悬停待命"
},
{
"command" : "return_home",
"label" : "立即返航",
"sub" : "中断任务"
}
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "arrived_pending_start",
"title" : "无人机已到达(模拟)"
}
},
"msg" : "local mock success"
}
},
{
"error" : "未能完成操作。(NSURLErrorDomain错误-1001。)",
"method" : "GET",
"path" : "/api/app/airport/live",
"query" : "id=901"
},
{
"error" : "未能完成操作。(NSURLErrorDomain错误-1001。)",
"method" : "GET",
"path" : "/api/app/airport/live",
"query" : "id=901"
}
],
"scenario" : "success",
"source" : "local_mock"
}
@@ -0,0 +1,147 @@
{
"command_scenario" : "success",
"description" : "纯内存模拟,未调用后端或设备",
"network_sent" : false,
"records" : [
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : false,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "failed",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"result_message" : "本地模拟:航线执行失败,无人机空闲待命。",
"scenic_id" : 128,
"status" : 40,
"status_label" : "任务失败(模拟)",
"wayline_status" : 91,
"wayline_status_label" : "执行失败(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"result_message" : "本地模拟:航线执行失败,无人机空闲待命。",
"scenic_id" : 128,
"status" : 40,
"status_label" : "任务失败(模拟)",
"wayline_status" : 91,
"wayline_status_label" : "执行失败(模拟)"
},
"ui" : {
"commands" : [
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "failed",
"title" : "本地模拟:航线执行失败,可验证重新召唤流程"
}
},
"msg" : "local mock success"
}
},
{
"http_status" : 200,
"method" : "POST",
"path" : "/api/app/airport/shoot",
"request_body" : {
"id" : 901,
"restart" : true
},
"response_body" : {
"code" : 100099,
"data" : {
},
"msg" : "本地模拟:设备暂不可用,重新召唤被拒绝"
}
},
{
"http_status" : 200,
"method" : "POST",
"path" : "/api/app/airport/shoot",
"request_body" : {
"id" : 901,
"restart" : true
},
"response_body" : {
"code" : 100099,
"data" : {
},
"msg" : "本地模拟:设备暂不可用,重新召唤被拒绝"
}
}
],
"scenario" : "success",
"source" : "local_mock"
}
@@ -0,0 +1,261 @@
{
"command_scenario" : "success",
"description" : "纯内存模拟,未调用后端或设备",
"network_sent" : false,
"records" : [
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : false,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "failed",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"result_message" : "本地模拟:航线执行失败,无人机空闲待命。",
"scenic_id" : 128,
"status" : 40,
"status_label" : "任务失败(模拟)",
"wayline_status" : 91,
"wayline_status_label" : "执行失败(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"result_message" : "本地模拟:航线执行失败,无人机空闲待命。",
"scenic_id" : 128,
"status" : 40,
"status_label" : "任务失败(模拟)",
"wayline_status" : 91,
"wayline_status_label" : "执行失败(模拟)"
},
"ui" : {
"commands" : [
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "failed",
"title" : "本地模拟:航线执行失败,可验证重新召唤流程"
}
},
"msg" : "local mock success"
}
},
{
"http_status" : 200,
"method" : "POST",
"path" : "/api/app/airport/shoot",
"request_body" : {
"id" : 901,
"restart" : true
},
"response_body" : {
"code" : 100000,
"data" : {
"airport_sn" : "LOCAL-MOCK-DOCK-201",
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"order_flight_task_id" : 901,
"plane_id" : 201,
"task_uuid" : "LOCAL-MOCK-TASK-UUID-901",
"ui" : {
"message" : "本地模拟召唤成功,没有网络或设备指令。",
"phase" : "arrived_pending_start",
"title" : "无人机已到达(模拟)"
}
},
"msg" : "local mock success"
}
},
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : true,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "start_shoot",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"scenic_id" : 128,
"status" : 20,
"status_label" : "执行中(模拟)",
"wayline_status" : 20,
"wayline_status_label" : "执行中(模拟)"
},
"ui" : {
"commands" : [
{
"command" : "flighttask_pause",
"label" : "紧急暂停",
"sub" : "悬停待命"
},
{
"command" : "return_home",
"label" : "立即返航",
"sub" : "中断任务"
}
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "arrived_pending_start",
"title" : "无人机已到达(模拟)"
}
},
"msg" : "local mock success"
}
}
],
"scenario" : "success",
"source" : "local_mock"
}
@@ -0,0 +1,230 @@
{
"command_scenario" : "success",
"description" : "纯内存模拟,未调用后端或设备",
"network_sent" : false,
"records" : [
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : false,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "failed",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"result_message" : "本地模拟:航线执行失败,无人机空闲待命。",
"scenic_id" : 128,
"status" : 40,
"status_label" : "任务失败(模拟)",
"wayline_status" : 91,
"wayline_status_label" : "执行失败(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"result_message" : "本地模拟:航线执行失败,无人机空闲待命。",
"scenic_id" : 128,
"status" : 40,
"status_label" : "任务失败(模拟)",
"wayline_status" : 91,
"wayline_status_label" : "执行失败(模拟)"
},
"ui" : {
"commands" : [
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "failed",
"title" : "本地模拟:航线执行失败,可验证重新召唤流程"
}
},
"msg" : "local mock success"
}
},
{
"error" : "未能完成操作。(NSURLErrorDomain错误-1001。)",
"method" : "POST",
"path" : "/api/app/airport/shoot",
"request_body" : {
"id" : 901,
"restart" : true
}
},
{
"http_status" : 200,
"method" : "GET",
"path" : "/api/app/airport/shooting",
"query" : "id=901&live_battery=1",
"response_body" : {
"code" : 100000,
"data" : {
"air_line" : {
"id" : 401,
"name" : "模拟航线",
"scenic_spot_id" : 301
},
"current_plane" : {
"id" : 201,
"online_status" : 1,
"sn_number" : "LOCAL-MOCK-PLANE-201",
"status_text" : "本地模拟 · 空闲 · 电量95%",
"work_status" : 1,
"work_status_label" : "空闲"
},
"execute_gate" : {
"can_execute" : false,
"code" : "ok",
"message" : "本地模拟:允许验证开拍请求",
"primary_action" : "failed",
"primary_action_label" : "开始拍摄"
},
"header" : {
"order_number" : "LOCAL-MOCK-ORDER-901",
"package_name" : "模拟套餐 · 含5次拍摄",
"title" : "模拟点位 · 模拟航线",
"tourist_label" : "本地模拟,无设备指令"
},
"metrics" : [
{
"key" : "battery",
"value" : "95%"
},
{
"key" : "env_temp",
"value" : "20.3℃"
},
{
"key" : "wind_speed",
"value" : "0m/s"
},
{
"key" : "rainfall",
"value" : "无雨"
},
{
"key" : "signal",
"value" : "良好"
},
{
"key" : "satellite",
"value" : "36颗"
}
],
"order_flight_task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"result_message" : "本地模拟:航线执行失败,无人机空闲待命。",
"scenic_id" : 128,
"status" : 40,
"status_label" : "任务失败(模拟)",
"wayline_status" : 91,
"wayline_status_label" : "执行失败(模拟)"
},
"order_number" : "LOCAL-MOCK-ORDER-901",
"plane_status" : {
"connected" : true,
"poll_hint_ms" : 5000,
"scenic_id" : 128
},
"scenic" : {
"id" : 128,
"name" : "本地模拟景区"
},
"scenic_spot" : {
"id" : 301,
"name" : "模拟点位"
},
"task" : {
"id" : 901,
"order_number" : "LOCAL-MOCK-ORDER-901",
"result_message" : "本地模拟:航线执行失败,无人机空闲待命。",
"scenic_id" : 128,
"status" : 40,
"status_label" : "任务失败(模拟)",
"wayline_status" : 91,
"wayline_status_label" : "执行失败(模拟)"
},
"ui" : {
"commands" : [
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "failed",
"title" : "本地模拟:航线执行失败,可验证重新召唤流程"
}
},
"msg" : "local mock success"
}
}
],
"scenario" : "success",
"source" : "local_mock"
}