feat: 完善机巢模拟调试与素材交付交互

增加禁飞期间的设备指令拦截及本地模拟拍摄流程;适配订单素材库和景区空境库,完善素材筛选、预览与下载;订单交付入口改为方式选择弹窗并复用云端上传。补充单元测试、接口记录和模拟器截图。
This commit is contained in:
2026-10-30 09:59:11 +08:00
parent e827bf8725
commit b95b251de1
100 changed files with 7256 additions and 500 deletions
@@ -0,0 +1,264 @@
{
"source": "local_mock",
"description": "纯内存模拟,未调用后端或设备;从模拟器日志提取,不代表后端实测响应。",
"network_sent": false,
"scenario": "success",
"records": [
{
"method": "GET",
"path": "/api/app/airport/shooting",
"network_sent": false,
"query": {
"id": "901",
"live_battery": "1"
},
"http_status": 200,
"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": {
"message": "点击开始拍摄,仅验证本地接口流程。",
"phase": "arrived_pending_start",
"title": "无人机已到达(模拟)"
}
},
"msg": "local mock success"
}
},
{
"method": "POST",
"path": "/api/app/airport/start-shoot",
"network_sent": false,
"request_body": {
"id": 901
},
"http_status": 200,
"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": {
"commands": [
{
"command": "flighttask_pause",
"label": "紧急暂停",
"sub": "悬停待命"
},
{
"command": "return_home",
"label": "立即返航",
"sub": "中断任务"
}
],
"message": "本地模拟开拍回执,不代表真实设备执行。",
"phase": "shooting",
"primary_action": "shooting",
"title": "无人机正在拍摄中(模拟)"
}
},
"msg": "local mock success"
}
},
{
"method": "GET",
"path": "/api/app/airport/shooting",
"network_sent": false,
"query": {
"id": "901",
"live_battery": "1"
},
"http_status": 200,
"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": 2,
"work_status_label": "拍摄中"
},
"execute_gate": {
"can_execute": false,
"code": "already_started",
"message": "本地模拟:开拍已受理",
"primary_action": "shooting",
"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": {
"message": "本地模拟状态回查:拍摄中,未向设备发送指令。",
"phase": "shooting",
"title": "无人机正在拍摄中(模拟)"
}
},
"msg": "local mock success"
}
}
]
}