bug 修改

This commit is contained in:
duanliang
2025-05-30 19:14:34 +08:00
parent 0ff44c7ef4
commit de6aefae9d
4 changed files with 14 additions and 12 deletions

BIN
distnew.zip Normal file

Binary file not shown.

View File

@@ -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)

View File

@@ -14,7 +14,7 @@
width:(100/grad)+'%'
}">
<div class="video-item__inner">
<div class="video-item__inner" @click="handleCamera(element.cameraIndexCode,element)">
<div
v-if="element.isDiy == 1"
class="video-item__follow"
@@ -74,7 +74,7 @@
</template>
<script setup>
import { getVideCollectCate,getVideCollectCateSort,getColletDiyApi } from '@/api/home'
import { getVideCollectCate,getVideCollectCateSort,getColletDiyApi,getPreviewUrlApi} from '@/api/home'
import {
getVideoTypeApi,
getVideoRegionsApi,

View File

@@ -1066,6 +1066,7 @@
box-sizing: border-box;
background-image: url('@/assets/images/bg-3.png');
background-size: 100% 100%;
flex:1;
}
.box {
@extend .bg;
@@ -1091,6 +1092,7 @@
.box-5 {
@extend .bg;
height: vh(465);
flex:1;
}
.car-box {
width: vw(316);
@@ -1137,7 +1139,7 @@
align-items: center;
}
.car-ship {
width: vw(660);
width: 100%;
height: vh(250);
}
.full {