From 0656a64931e0517f8791f983f1a872047cc4a27b Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 18 Apr 2025 19:50:12 +0800
Subject: [PATCH] feat: 增加广播和播放功能

---
 src/api/payload.js |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/src/api/payload.js b/src/api/payload.js
index 77b9be3..aa4796a 100644
--- a/src/api/payload.js
+++ b/src/api/payload.js
@@ -79,5 +79,57 @@
   });
 };
 
+// 喊话
+export const startVoice = (data) => {
+  return request({
+    url:`/drone-device-core/speak/api/v1/startVoice`,
+    method: 'post',
+    data,
+  });
+};
+
+//播报列表单个音频文件播放(远离河道)
+export const stayAwayRiver = (params) => {
+  const url = `/drone-device-core/speak/api/v1/putVoice`;
+  return request({
+      url,
+      method: 'post',
+      params,
+  });
+};
+
+//播报文件
+export const getVoiceFile = (params) => {
+  const url = `/drone-device-core/speak/api/v1/getVoiceFile`;
+  return request({
+      url,
+      method: 'post',
+      params,
+  });
+};
+
+// 上传音频文件
+export const uploadSpeak = (data) => {
+  const url = `/drone-device-core/speak/api/v1/uploadSpeak`;
+  return request({
+      url,
+      method: 'post',
+      headers: {
+        'Content-Type': 'multipart/form-data',
+      },
+      data,
+  });
+};
+
+// 播放音频
+export const playAudio = (params) => {
+  const url = `/drone-device-core/speak/api/v1/startVoices`;
+  return request({
+      url,
+      method: 'post',
+      params,
+  });
+};
+
 
 

--
Gitblit v1.9.3