From f27ca082eb0a839449dd50c49007b58e5ed6946f Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Thu, 19 Jun 2025 19:08:01 +0800
Subject: [PATCH] feat: 服务名修改

---
 src/api/device-cmd/index.ts |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/api/device-cmd/index.ts b/src/api/device-cmd/index.ts
index f4ea817..1d6fc43 100644
--- a/src/api/device-cmd/index.ts
+++ b/src/api/device-cmd/index.ts
@@ -1,5 +1,14 @@
+/*
+ * @Author: GuLiMmo 2820890765@qq.com
+ * @Date: 2024-03-12 17:59:03
+ * @LastEditors: GuLiMmo 2820890765@qq.com
+ * @LastEditTime: 2024-08-28 14:25:29
+ * @FilePath: /drone-web/src/api/device-cmd/index.ts
+ * @Description:
+ * Copyright (c) 2024 by GuLiMmo, All Rights Reserved.
+ */
 import request, { IWorkspaceResponse } from '/@/api/http/request'
-import { DeviceCmd } from '/@/types/device-cmd'
+import { DeviceCmd, DeviceCmdItemAction } from '/@/types/device-cmd'
 
 const CMD_API_PREFIX = '/control/api/v1'
 
@@ -8,13 +17,16 @@
   device_cmd: DeviceCmd // 指令
 }
 
+export interface PostSendCmdBody {
+  action: DeviceCmdItemAction
+}
 /**
  * 发送机场控制指令
  * @param params
  * @returns
  */
 // /control/api/v1/devices/{dock_sn}/jobs/{service_identifier}
-export async function postSendCmd (params: SendCmdParams): Promise<IWorkspaceResponse<{}>> {
-  const resp = await request.post(`${CMD_API_PREFIX}/devices/${params.dock_sn}/jobs/${params.device_cmd}`)
+export async function postSendCmd (params: SendCmdParams, body?: PostSendCmdBody): Promise<IWorkspaceResponse<{}>> {
+  const resp = await request.post(`${CMD_API_PREFIX}/devices/${params.dock_sn}/jobs/${params.device_cmd}`, body)
   return resp.data
 }

--
Gitblit v1.9.3