bug 修改
This commit is contained in:
@@ -18,13 +18,13 @@
|
||||
<div class="action-box">
|
||||
<div class="action-item">
|
||||
<div
|
||||
v-if="isCollect == 1"
|
||||
v-if="colletCond == 1"
|
||||
class="video-follow"
|
||||
@click.stop="handleCollect()"
|
||||
>取消关注
|
||||
</div>
|
||||
<div
|
||||
v-if="isCollect == 0"
|
||||
v-if="colletCond == 0"
|
||||
class="video-unfollow"
|
||||
@click.stop="handleCollect()"
|
||||
>关注
|
||||
@@ -94,7 +94,6 @@
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
let colletCond = ref(0)
|
||||
let modelValue = defineModel()
|
||||
let videoRef = ref()
|
||||
let webRtcServer = null
|
||||
@@ -104,18 +103,19 @@
|
||||
() => props.isCollect,
|
||||
(val) => {
|
||||
if (val) {
|
||||
colletCond.value = val
|
||||
// colletCond.value = val
|
||||
// setTimeout(() => {
|
||||
// init()
|
||||
// }, 1000)
|
||||
}else{
|
||||
colletCond.value = 0
|
||||
// colletCond.value = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
let colletCond = ref(props.isCollect)
|
||||
let isDayCurr = ref(props.isDiy)
|
||||
// 收藏
|
||||
const handleCollectAdd = async (id, status, index) => {
|
||||
@@ -136,12 +136,12 @@
|
||||
const handleCollect = async (id, status, index) => {
|
||||
await postVideoCollectApi({
|
||||
cameraIndexCode:props.cameraIndexCode,
|
||||
isCollect: props.isCollect == 0 ? 1 : 0
|
||||
isCollect: colletCond.value == 0 ? 1 : 0
|
||||
})
|
||||
if (props.isCollect == 0) {
|
||||
props.isCollect = 1
|
||||
if (colletCond.value == 0) {
|
||||
colletCond.value = 1
|
||||
} else {
|
||||
props.isCollect = 0
|
||||
colletCond.value = 0
|
||||
modelValue.value = false
|
||||
}
|
||||
pubSub.publish('videoCollect', props.cameraIndexCode)
|
||||
|
||||
Reference in New Issue
Block a user