|
|
@@ -2,9 +2,9 @@
|
|
|
<view>
|
|
|
<view class="row image-box">
|
|
|
<view class="image-item m-r20 m-t20" mode="aspectFill" v-for="(item,index) in imgList">
|
|
|
- <image class="image r-10 " :src="item.type === 1?item.url:getVideoImg(item.url)" :style="[{width},{height}]" @click="onPreviewImage(item)">
|
|
|
+ <image class="image r-10 " :src="item.type === 1?item.url:getVideoImg(item.url)" :style="[{width},{height}]" @click.stop="onPreviewImage(item)">
|
|
|
</image>
|
|
|
- <image class="wh-45 video-icon" src="/static/img/task/play.png" mode="aspectFill" v-if="item.type === 2">
|
|
|
+ <image class="wh-45 video-icon" src="/static/img/task/play.png" mode="aspectFill" @click.stop="showVideoImg(item.url)" v-if="item.type === 2">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -48,7 +48,13 @@
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
onPreviewImage(item) {
|
|
|
- this.$emit('onShowImg',item.url)
|
|
|
+ if(item.type===1){
|
|
|
+ this.$emit('onShowImg',item.url)
|
|
|
+ }else {
|
|
|
+ this.showVideoImg(item.url)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
closeVideoImg(e) {
|
|
|
if (!e.show) {
|
|
|
@@ -87,4 +93,13 @@
|
|
|
transform: translate(-50%, -50%);
|
|
|
}
|
|
|
}
|
|
|
+ .video-box {
|
|
|
+ height: 70vh;
|
|
|
+ width: 100vw;
|
|
|
+
|
|
|
+ .myVideo {
|
|
|
+ height: 70vh;
|
|
|
+ width: 100vw;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|