This commit is contained in:
duanliang
2025-04-30 19:28:55 +08:00
parent 8c4d2423a2
commit 5563dc0536

View File

@@ -15,8 +15,16 @@
:key="index"
@click="handleItem(item)"
>
<div class="item-unfollow" @click.stop="handleCollect(item.cameraIndexCode, index)">取消关注</div>
<video class="item-video" :id="'video' + index" muted autoplay :controls="false">
<div
v-if="item.isCollect == 1"
class="item-unfollow"
@click.stop="handleCollect(item.cameraIndexCode, index)">取消关注</div>
<div
v-if="item.isCollect == 0"
class="item-unfollow"
@click.stop="handleCollect(item.cameraIndexCode, index)">关注</div>
<video class="item-video" :id="'video' + index" muted autoplay :controls="false">
<source type="application/x-mpegURL" />
</video>
<p>
@@ -78,6 +86,7 @@
if (val) {
cond.value = false
params.businessScenicArea = props.events.id
list.value = []
setTimeout(() => {
getVideoList()
}, 1000)
@@ -98,10 +107,10 @@
cameraIndexCode.value = item.cameraIndexCode
videoShow.value = true
}
const handleCollect = async (id, index) => {
const handleCollect = async (id, status) => {
await postVideoCollectApi({
cameraIndexCode:id,
isCollect: 0
isCollect: status == 0 ? 1 : 0
})
clearHlsRefs()
params.pageNum = 1
@@ -128,6 +137,7 @@
let cond = ref(false)
const getVideoList = async () => {
let res = await getSpotVideoEvents(params)
console.log(res,'rrrrrrrrr')
list.value = res.data
total.value = res.total
setTimeout(()=>{cond.value = true},1500)