From e1699c4851f6ca397cd0ad1ff63f32c737654836 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Wed, 02 Apr 2025 19:14:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue b/src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue
index f441252..5c8d29e 100644
--- a/src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue
+++ b/src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue
@@ -3,7 +3,7 @@
   <CommonTitle title="机巢监控" />
   <div :style="{ marginLeft: pxToRem(14) }">
     <div class="machine-monitor">
-      <liveVideo></liveVideo>
+      <LiveVideo :videoUrl="airPortUrl" />
     </div>
   </div>
 </template>
@@ -11,6 +11,26 @@
 <script setup>
 import CommonTitle from '@/components/CommonTitle.vue';
 import LiveVideo from '@/components/LiveVideo.vue';
+import { liveStart } from '@/api/home/machineNest';
+// import { CURRENT_CONFIG as config } from '@/utils/http/config'
+import { useStore } from 'vuex';
+
+
+const store = useStore();
+// 单个机巢信息
+const singleUavHome = computed(() => store.state.home.singleUavHome);
+// 直播地址
+let airPortUrl = ref('');
+// 获取直播地址
+const getVideoUrl = () => {
+  liveStart(singleUavHome.value.device_sn).then(res => {
+    if (res.data.code !== 0) return;
+    airPortUrl.value = res.data.data.rtcs_url;
+  });
+};
+onMounted(() => {
+  getVideoUrl();
+});
 </script>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.3