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