类型:开发

描述:
This commit is contained in:
2025-12-19 20:16:43 +08:00
parent aa18dc7a4c
commit c392ce026d
4 changed files with 61 additions and 15 deletions

View File

@@ -262,8 +262,7 @@
isSkip.value = false
isBack.value = true
let res = await getSpotListApi()
navLeft.value = res.data
navLeft.value = res.data.slice(0,3)
current.value = res.data[0].id
title.value = navLeft.value[0].name
pubSub.publish('scenicChange', navLeft.value[0])
@@ -307,7 +306,7 @@
scenicSpotId: '',
id:10086,
},
...spotRes.data
...spotRes.data.slice(0,3)
]
if(monitorDefaultData.value){
current.value = monitorDefaultData.value.id

View File

@@ -287,7 +287,12 @@
// 返回列表
const handleBack = () => {
videoLog.value = 1
try{
hlsRef.destroy()
}catch (e) {
}
initVideo()
}
let isCollect = ref(0)
@@ -308,7 +313,12 @@
const clearHlsRefs = () => {
if (hlsRefs.length > 0) {
hlsRefs.map((item) => {
try{
item.destroy()
}catch (e) {
}
})
hlsRefs = []
}
@@ -337,8 +347,13 @@
player.play()
// 错误处理和重连机制
player.on(mpegtsjs.Events.ERROR, (err) => {
try{
player.unload();
player.destroy();
}catch (e) {
}
console.error('播放器错误:', err)
// 3 秒后尝试重新加载
setTimeout(() => {

View File

@@ -293,7 +293,11 @@ const onInput = debounce((e) => {
const clearHlsRefs = () => {
if (hlsRefs.length > 0) {
hlsRefs.map((item) => {
try{
item.destroy()
}catch (e) {
}
})
hlsRefs = []
}
@@ -339,7 +343,12 @@ const handleNav = (e) => {
}
const handleBack = () => {
videoLog.value = 1
try{
hlsRef.destroy()
}catch (e) {
}
initVideo()
}
let thisVideo = ref(null)
@@ -367,8 +376,12 @@ const handleItemVideo = async (url, type, code, item) => {
hlsRef.on('error', (err) => {
console.error('播放器错误:', err)
// 3 秒后尝试重新加载
try{
hlsRef.unload()
hlsRef.destroy()
}catch (e) {
}
// 3 秒后尝试重新加载
setTimeout(() => {
console.error('重新加载【'+cameraIndexCode+'】' )
@@ -502,8 +515,13 @@ const createPlayer = (cameraIndexCode,videoElement) => {
// 错误处理和重连机制
player.on(mpegtsjs.Events.ERROR, (err) => {
console.error('播放器错误【'+cameraIndexCode+'】:', err)
try{
player.unload();
player.destroy();
}catch (e) {
}
// 3 秒后尝试重新加载
setTimeout(() => {
console.error('重新加载【'+cameraIndexCode+'】' )

View File

@@ -232,6 +232,20 @@
flex-wrap: wrap;
align-content: flex-start;
padding:vw(10);
overflow: auto;
/* 滚动条整体样式 */
&::-webkit-scrollbar {
height: vh(4); /* 滚动条的宽度 */
}
/* 滚动条轨道 */
&::-webkit-scrollbar-track {
background: 'transparent'; /* 轨道的背景色 */
}
/* 滚动条滑块 */
&::-webkit-scrollbar-thumb {
background: rgba(0, 150, 255, 0.63); /* 滑块的背景色 */
border-radius: 5px; /* 滑块的圆角 */
}
.item {
position: relative;
width: 33%;