diff --git a/dist.zip b/dist.zip index a144312..d27a7e5 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/components/VideoDialog/index.vue b/src/components/VideoDialog/index.vue index 5e74304..df298f3 100644 --- a/src/components/VideoDialog/index.vue +++ b/src/components/VideoDialog/index.vue @@ -36,13 +36,13 @@
取消关注
关注 @@ -97,11 +97,14 @@ () => props.isCollect, (val) => { if (val) { + console.log(val,'val 2222222222222222222222') colletCond.value = val // setTimeout(() => { // init() // }, 1000) - } + }else{ + colletCond.value = 0 + } }, { immediate: true @@ -109,16 +112,18 @@ ) // 关注 const handleCollect = async (id, status, index) => { + // console.log(props.isCollect,777788888) await postVideoCollectApi({ cameraIndexCode:props.cameraIndexCode, - isCollect: colletCond.value == 0 ? 1 : 0 + isCollect: props.isCollect == 0 ? 1 : 0 }) - if (colletCond.value == 0) { - colletCond.value = 1 + if (props.isCollect == 0) { + props.isCollect = 1 } else { - colletCond.value = 0 + props.isCollect = 0 } pubSub.publish('videoCollect', props.cameraIndexCode) + modelValue.value = false } const handleAction = async (e) => { if (e == STOP) { @@ -177,6 +182,7 @@ } }) } + onMounted(()=>{ }) diff --git a/src/layout/components/CoreVideo/allList.vue b/src/layout/components/CoreVideo/allList.vue index 0e59e87..331116a 100644 --- a/src/layout/components/CoreVideo/allList.vue +++ b/src/layout/components/CoreVideo/allList.vue @@ -32,7 +32,7 @@
- + diff --git a/src/layout/components/CoreVideo/index.vue b/src/layout/components/CoreVideo/index.vue index bcae8ce..ee24a71 100644 --- a/src/layout/components/CoreVideo/index.vue +++ b/src/layout/components/CoreVideo/index.vue @@ -79,6 +79,7 @@ let isCollect = ref(0) const postVideoRemain = () => { timer = setInterval(() => { + if(!list.value.length) return false; postVideoRemainApi({ cameraIndexCode: list.value.map((item) => item.cameraIndexCode) }) @@ -99,8 +100,15 @@ let isCollect = ref(0) pageSize: 5 }) list.value = res.data - console.log(list.value,'list.valuelist.valuelist.valuelist.value') - postVideoRemain() + console.log(list.value,'ddsdsdsfdd') + if(list.value.length){ + postVideoRemain() + }else{ + console.log('清除定时器') + //清除定时器 + if (timer) clearInterval(timer) + } + // console.log(list.value,'list.valuelist.valuelist.valuelist.value') // nextTick(() => { // list.value.forEach(async (item, index) => { // var video = document.getElementById(`video${index}`) @@ -135,6 +143,7 @@ let isCollect = ref(0) const onVideoCollect = () => { pubSub.subscribe('videoCollect', () => { clearHlsRefs() + // getVideoList() }) } diff --git a/src/layout/components/Header/index.vue b/src/layout/components/Header/index.vue index ef1e77a..1822887 100644 --- a/src/layout/components/Header/index.vue +++ b/src/layout/components/Header/index.vue @@ -246,7 +246,7 @@ navLeft.value = res.data current.value = res.data[0].id - title.value = navLeft.value[current.value].name + title.value = navLeft.value[0].name pubSub.publish('scenicChange', navLeft.value[0]) otherLeftNav.value = [ // { @@ -287,6 +287,7 @@ ...spotRes.data ] current.value = navLeft.value[0].id + title.value = navLeft.value[0].name break case '/sceneTesting': title.value = '三峡之巅-安全检测' @@ -337,9 +338,10 @@ isBack.value = true let hotelRes = await getHotelListApi({ hotelStadiumType: 1 }) navLeft.value = hotelRes.data.slice(0, 3) + current.vlaue = navLeft.value[0].id otherLeftNav.value = hotelRes.data.slice(3, hotelRes.data.length - 1) let venueRes = await getHotelListApi({ hotelStadiumType: 2 }) - console.log(venueRes,'venueRes') + // console.log(venueRes,'venueRes') navRight.value = venueRes.data.slice(0, 3) otherRightNav.value = venueRes.data.slice(3, venueRes.data.length - 1) pubSub.publish('hotelChange', hotelRes.data[0]) diff --git a/src/views/scenic/components/box-2.vue b/src/views/scenic/components/box-2.vue index 8bf911b..8f7cdae 100644 --- a/src/views/scenic/components/box-2.vue +++ b/src/views/scenic/components/box-2.vue @@ -468,12 +468,12 @@ right:vw(20); top:50%; transform: translateY(-50%); - padding: vw(16); + padding: vw(12); display: flex; align-items: center; background: #0a4190; border-radius: vw(8); - font-size:vw(24); + font-size:vw(22); color:#fff; } }