2023-09-28 10:07:02 +00:00
|
|
|
<template>
|
|
|
|
<view class="timeVideo">
|
|
|
|
<u-navbar :background="background" :is-back='true' back-icon-color='#FFFFFF' :border-bottom="false" title="实时视频"
|
|
|
|
title-color='#FFFFFF' :title-bold='true' title-size='32'></u-navbar>
|
2024-01-10 02:42:05 +00:00
|
|
|
|
|
|
|
<view class="content">
|
|
|
|
<view class="item" v-for="(item,index) in deviceList" :key="index">
|
|
|
|
<view class="nav">
|
|
|
|
<image src="../../static/video.png" mode=""></image>
|
|
|
|
<text>{{item.deviceTypeName}}-摄像机#2</text>
|
|
|
|
</view>
|
|
|
|
<view class="video" >
|
|
|
|
<image src="../../static/video1.png" mode=""></image>
|
|
|
|
<!-- <live-player :src="src" mode='live' muted='true' autoplay @error="error"
|
|
|
|
style="width: 100%; height: 100%;border-radius: 15rpx;" /> -->
|
|
|
|
</view>
|
|
|
|
<view class="timer">
|
|
|
|
<view class="left">
|
|
|
|
<image src="../../static/timer.png" mode=""></image>
|
|
|
|
<text>2023-09-20 14:00:55</text>
|
2023-09-28 10:07:02 +00:00
|
|
|
</view>
|
2024-01-10 02:42:05 +00:00
|
|
|
<view class="right" @click="toVideoLive">
|
|
|
|
<image src="../../static/play.png" mode=""></image>
|
|
|
|
<text>现场实况</text>
|
2023-09-28 10:07:02 +00:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2024-01-10 02:42:05 +00:00
|
|
|
</view>
|
2023-09-28 10:07:02 +00:00
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-01-10 02:42:05 +00:00
|
|
|
// import EZUIKit from 'ezuikit-js';
|
2023-09-28 10:07:02 +00:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
// 头部导航背景
|
|
|
|
background: {
|
|
|
|
backgroundColor: '#24B383',
|
|
|
|
},
|
2024-01-10 02:42:05 +00:00
|
|
|
|
|
|
|
userid: '',
|
|
|
|
deviceList: [],
|
|
|
|
liveList: [],
|
|
|
|
src: ''
|
2023-09-28 10:07:02 +00:00
|
|
|
};
|
|
|
|
},
|
2024-01-10 02:42:05 +00:00
|
|
|
onPullDownRefresh() {
|
|
|
|
this.getEquipmentInfo(this.userid)
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.userid = uni.getStorageSync('userid');
|
|
|
|
// console.log(EZUIKit);
|
|
|
|
this.getEquipmentInfo(this.userid)
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
// 根据用户id查询对应的设备数据
|
|
|
|
getEquipmentInfo(userid) {
|
|
|
|
uni.showLoading({
|
|
|
|
title: '加载中...'
|
|
|
|
})
|
|
|
|
this.$http({
|
|
|
|
url: this.api.sel_eqbyid + userid,
|
|
|
|
method: 'GET'
|
|
|
|
}).then(res => {
|
|
|
|
if (res.code == 200) {
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.stopPullDownRefresh();
|
|
|
|
this.deviceList = res.data
|
|
|
|
// this.deviceList.forEach(el=>{
|
|
|
|
// this.getVideoData(el.cameraSerialNumber,el.cameraChannelNumber)
|
|
|
|
// })
|
|
|
|
this.getVideoData("AD6463273", 11)
|
|
|
|
} else {
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
title: res.msg,
|
|
|
|
type: 'error',
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取摄像头得地址
|
|
|
|
getVideoData(cameraid, channelid) {
|
|
|
|
this.$http({
|
|
|
|
url: this.api.camera_gethls,
|
|
|
|
method: 'GET',
|
|
|
|
data: {
|
|
|
|
cameraid,
|
|
|
|
channelid,
|
|
|
|
}
|
|
|
|
}).then(res => {
|
|
|
|
if (res.code == 200) {
|
|
|
|
this.src = res.ezopen
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
toVideoLive() {
|
2023-09-28 10:07:02 +00:00
|
|
|
uni.navigateTo({
|
2024-01-10 02:42:05 +00:00
|
|
|
url: '/pages/videoLive/videoLive'
|
2023-09-28 10:07:02 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2024-01-10 02:42:05 +00:00
|
|
|
.timeVideo {
|
|
|
|
width: 100%;
|
|
|
|
min-height: 100vh;
|
|
|
|
background-color: #F5F6FA;
|
|
|
|
|
|
|
|
.content {
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 30rpx;
|
|
|
|
|
|
|
|
.item {
|
2023-09-28 10:07:02 +00:00
|
|
|
width: 690rpx;
|
2024-01-10 02:42:05 +00:00
|
|
|
height: 577rpx;
|
2023-09-28 10:07:02 +00:00
|
|
|
background: #FFFFFF;
|
|
|
|
border-radius: 15rpx;
|
2024-01-10 02:42:05 +00:00
|
|
|
margin-bottom: 30rpx;
|
|
|
|
|
|
|
|
.nav {
|
|
|
|
height: 90rpx;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 20rpx;
|
2023-09-28 10:07:02 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2024-01-10 02:42:05 +00:00
|
|
|
|
|
|
|
>image {
|
|
|
|
width: 50rpx;
|
|
|
|
height: 50rpx;
|
|
|
|
margin-right: 16rpx;
|
2023-09-28 10:07:02 +00:00
|
|
|
}
|
2024-01-10 02:42:05 +00:00
|
|
|
|
|
|
|
>text {
|
|
|
|
font-size: 30rpx;
|
2023-09-28 10:07:02 +00:00
|
|
|
font-family: PingFang SC;
|
|
|
|
font-weight: bold;
|
2024-01-10 02:42:05 +00:00
|
|
|
color: #333333;
|
2023-09-28 10:07:02 +00:00
|
|
|
}
|
|
|
|
}
|
2024-01-10 02:42:05 +00:00
|
|
|
|
|
|
|
.video {
|
|
|
|
width: 690rpx;
|
|
|
|
height: 380rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
border-radius: 15rpx;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0 20rpx;
|
|
|
|
|
|
|
|
>image {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.timer {
|
|
|
|
width: 100%;
|
|
|
|
height: 107rpx;
|
2023-09-28 10:07:02 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2024-01-10 02:42:05 +00:00
|
|
|
justify-content: space-between;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0 20rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.left {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
>image {
|
|
|
|
width: 30rpx;
|
|
|
|
height: 30rpx;
|
|
|
|
margin-right: 10rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
>text {
|
|
|
|
font-size: 24rpx;
|
|
|
|
font-family: PingFang SC;
|
|
|
|
font-weight: bold;
|
|
|
|
color: #666666;
|
|
|
|
}
|
2023-09-28 10:07:02 +00:00
|
|
|
}
|
2024-01-10 02:42:05 +00:00
|
|
|
|
|
|
|
.right {
|
|
|
|
width: 200rpx;
|
|
|
|
height: 66rpx;
|
|
|
|
background: linear-gradient(0deg, #7BD4B6 0%, #26B383 100%);
|
|
|
|
border-radius: 33rpx;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
>image {
|
|
|
|
width: 30rpx;
|
|
|
|
height: 30rpx;
|
|
|
|
margin-right: 10rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
>text {
|
|
|
|
font-size: 28rpx;
|
|
|
|
font-family: PingFang SC;
|
|
|
|
font-weight: bold;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
2023-09-28 10:07:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-10 02:42:05 +00:00
|
|
|
</style>
|