|
|
|
@ -2,15 +2,16 @@ |
|
|
|
<view class="content"> |
|
|
|
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="全部摄像头"></uni-nav-bar> |
|
|
|
<view class="flex-col section_8" v-for="(camera, index) in cameraList" :key="index"> |
|
|
|
<view class="flex-col items-center group_12"> |
|
|
|
<video :src="camera.hlsUrl" autoplay class="image_2"></video> |
|
|
|
<!-- <image src="/static/imgs/digital-workshops/camera-tip-bg.png" class="image_2" @click="go2('video-play', { url: camera.videoUrl })" /> --> |
|
|
|
<text class="text_18" style="margin-top: 8rpx;">{{ camera.name }}</text> |
|
|
|
<view class="flex-col items-center group_12" @click="go2('video-play', { url: encodeURIComponent(camera.hlsUrl) })"> |
|
|
|
<image :src="getImageurl(camera)" class="image_2" /> |
|
|
|
<image src="/static/imgs/digital-workshops/icon-play.png" class="image_3" v-if="camera.defaultImg"/> |
|
|
|
<text class="text_18" style="color: black">{{ camera.name }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
import { go2, back } from '@/utils/hook.js' |
|
|
|
import { getCameraListApi } from '@/apis/factoryApi' |
|
|
|
@ -37,7 +38,13 @@ export default { |
|
|
|
this.cameraList = res |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
getImageurl(camera){ |
|
|
|
if(!camera.defaultImg){ |
|
|
|
return '/static/imgs/digital-workshops/camera-tip-bg.png' |
|
|
|
} |
|
|
|
return camera.defaultImg |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
@ -68,12 +75,12 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
.group_12 { |
|
|
|
// color: rgb(255, 255, 255); |
|
|
|
color: rgb(255, 255, 255); |
|
|
|
font-size: 30rpx; |
|
|
|
font-weight: 500; |
|
|
|
line-height: 40rpx; |
|
|
|
white-space: nowrap; |
|
|
|
// position: relative; |
|
|
|
position: relative; |
|
|
|
.image_2 { |
|
|
|
width: 91.5vw; |
|
|
|
height: 51.5vw; |
|
|
|
|