From 8e9a7434bd72959be5d8a2c7882189a800b85dfd Mon Sep 17 00:00:00 2001
From: husq <931347610@qq.com>
Date: Tue, 19 Sep 2023 16:59:21 +0800
Subject: [PATCH] 修改默认值
---
src/components/GMap.vue | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/src/components/GMap.vue b/src/components/GMap.vue
index 3c6e07c..ba82548 100644
--- a/src/components/GMap.vue
+++ b/src/components/GMap.vue
@@ -917,10 +917,10 @@
}
// 下拉框选择变化
const selectChange = async (e) => {
- await closeFly()
- setTimeout(async () => {
- await flyOnStart()
- }, 500)
+ // await closeFly()
+ // setTimeout(async () => {
+ await flyOnStart()
+ // }, 500)
}
// 关闭设备直播
const onClose = async () => {
@@ -936,6 +936,7 @@
}
// 飞机设备播放
const flyOnStart = async () => {
+ aircraftUrl.value = ''
const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0'
const streamId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '-' + aircraSelected.value + '-' + 'normal-0'
const liveURL = config.rtmpURL + streamId
@@ -952,16 +953,22 @@
}
// 飞行设备关闭
const closeFly = async () => {
- const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0'
+ aircraftList.value.forEach(item => {
+ const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + item.value + '/' + 'normal-0'
+ stopLivestream({
+ video_id: videoId
+ }).then(res => {
+ console.log(res, 'res')
+ if (res.code === 0) {
+ aircraftUrl.value = ''
+ }
+ }).catch(e => {
+ console.log(e, 'errrrrrrrrrrrrrr')
+ })
+ })
+ // const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0'
aircraftList.value = []
aircraSelected.value = ''
- stopLivestream({
- video_id: videoId
- }).then(res => {
- if (res.code === 0) {
- aircraftUrl.value = ''
- }
- })
}
watch(() => store.state.deviceStatusEvent,
data => {
--
Gitblit v1.9.3