<template>
|
<view class="content">
|
<uni-nav-bar left-icon="back" left-text="返回" @clickLeft="goBack" title="详情" statusBar="true"></uni-nav-bar>
|
|
<view class="video-box">
|
<video id="myVideo" :src=" 'http://192.168.20.10:7009' +'/httpImage/' +videoUrl"></video>
|
</view>
|
<view class="desc-box">
|
<view class="first">
|
<view class="time">
|
{{curInfo.date}} {{curInfo.time}}
|
</view>
|
<view class="level">
|
<view class="level-label">
|
|
</view>
|
<text class="level-text"> {{curInfo.warningLevel}} </text>
|
</view>
|
</view>
|
<view class="second">
|
来自:{{curInfo.pos}}
|
</view>
|
</view>
|
<!-- <image src="../../static/pic3.jpg" mode=""></image> -->
|
<button type="default" @tap="showImg">查看大图</button>
|
<imagePopper :show="showImgPopper.show" :imgSrc="showImgPopper.imgSrc" @hideImgPopper="hideImgPopper">
|
</imagePopper>
|
<view class="tui-actionsheet-mask" :class="[showImgPopper.show?'tui-mask-show':'']" @tap="handleClickMask">
|
<image :src="showImgPopper.imgSrc" mode=""></image>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import imagePopper from "@/components/imagePopper.vue"
|
export default {
|
components: {
|
imagePopper
|
},
|
data() {
|
return {
|
warningLevel: 1,
|
showImgPopper: {
|
show: false,
|
imgSrc: ""
|
},
|
curInfo: {},
|
videoUrl: ""
|
}
|
},
|
onBackPress(e) {
|
console.log(e);
|
uni.navigateTo({
|
url: '/pages/index/index'
|
})
|
// return true
|
},
|
mounted() {
|
this.curInfo = getApp().globalData.curPageDetail
|
uni.request({
|
url: "http://192.168.20.10:9000/video/" + this.curInfo.id,
|
success: (res) => {
|
console.log('request success', res.data.data.videoUrl);
|
this.videoUrl = res.data.data.videoUrl;
|
}
|
})
|
},
|
methods: {
|
goBack() {
|
uni.navigateTo({
|
url: "../index/index"
|
})
|
},
|
showImg() {
|
this.showImgPopper.show = true;
|
this.showImgPopper.imgSrc = 'http://192.168.20.10:7009' + '/httpImage/' + this.curInfo.imgUrl
|
},
|
hideImgPopper() {
|
this.showImgPopper.show = false;
|
},
|
handleClickMask() {
|
this.handleClickCancel();
|
},
|
handleClickCancel() {
|
this.showImgPopper.show = false;
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
uni-video {
|
width: 100%;
|
height: 290px;
|
/* height: -webkit-fill-available; */
|
display: inline-block;
|
line-height: 0;
|
overflow: hidden;
|
position: relative;
|
}
|
|
.desc-box {
|
padding: 20px;
|
|
.first {
|
display: flex;
|
justify-content: space-between;
|
|
.time {
|
margin-right: 20rpx;
|
min-width: 200rpx;
|
/* background: aliceblue; */
|
font-size: 28rpx;
|
}
|
|
.level {
|
display: flex;
|
align-items: center;
|
|
.level-label {
|
width: 20px;
|
height: 14px;
|
background: red;
|
border-radius: 3px;
|
margin-right: 5px;
|
}
|
|
.level-text {
|
font-size: 28rpx;
|
color: rgba(121, 121, 121, 1);
|
}
|
}
|
}
|
|
.second {
|
color: rgba(121, 121, 121, 1);
|
font-size: 28rpx;
|
margin-top: 20rpx;
|
}
|
}
|
|
uni-button[type=default] {
|
color: #fff;
|
|
background-color: rgba(239, 128, 72, 1);
|
/* position: absolute; */
|
/* bottom: 0; */
|
position: absolute;
|
bottom: 50px;
|
left: calc(50% - 40%);
|
width: 80%;
|
}
|
|
uni-button:after {
|
border: 0;
|
}
|
|
uni-button {
|
font-size: 16px;
|
line-height: 2.4;
|
border-radius: 15px;
|
}
|
|
.tui-actionsheet-mask {
|
position: fixed;
|
top: 0;
|
left: 0;
|
right: 0;
|
bottom: 0;
|
background: rgba(0, 0, 0, 0.6);
|
z-index: 999999999;
|
transition: all 0.3s ease-in-out;
|
opacity: 0;
|
visibility: hidden;
|
|
uni-image {
|
width: 340px;
|
height: 240px;
|
display: inline-block;
|
overflow: hidden;
|
position: absolute;
|
top: 45%;
|
left: 8%;
|
z-index: 999999999;
|
}
|
}
|
|
.tui-mask-show {
|
opacity: 1;
|
visibility: visible;
|
}
|
</style>
|