Files
suixinkan_uikit/docs/9.9.1/safety-command-mock-2026-10-30/timeout.mock.json
T
lujiuyin 20877b425c feat(drone-dock): 添加安全控制接口本地模拟调试
接入 command 请求合同与底部暂停、继续、返航、取消返航交互;支持同任务单次回查、防重复提交及未知结果锁。保留真实指令禁飞拦截,补充隔离测试、模拟回执与截图。
2026-10-30 10:32:31 +08:00

244 lines
7.2 KiB
JSON

{
"command_scenario" : "timeout",
"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" : 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" : {
"commands" : [
{
"command" : "flighttask_pause",
"label" : "紧急暂停",
"sub" : "悬停待命"
},
{
"command" : "return_home",
"label" : "立即返航",
"sub" : "中断任务"
}
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "shooting",
"title" : "无人机正在拍摄中(模拟)"
}
},
"msg" : "local mock success"
}
},
{
"error" : "未能完成操作。(NSURLErrorDomain错误-1001。)",
"method" : "POST",
"path" : "/api/app/airport/command",
"request_body" : {
"command" : "flighttask_pause",
"id" : 901
}
},
{
"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" : 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" : {
"commands" : [
{
"command" : "flighttask_pause",
"label" : "紧急暂停",
"sub" : "悬停待命"
},
{
"command" : "return_home",
"label" : "立即返航",
"sub" : "中断任务"
}
],
"message" : "本地模拟状态回查,未向设备发送指令。",
"phase" : "shooting",
"title" : "无人机正在拍摄中(模拟)"
}
},
"msg" : "local mock success"
}
}
],
"scenario" : "success",
"source" : "local_mock"
}