|
|
@@ -5,13 +5,13 @@
|
|
|
v-model="msgData.msg" :maxlength="999" :placeholder="placeholder"></textarea>
|
|
|
<view class="size-26 m-t20 sys-weight-600">上传图片</view>
|
|
|
<view class="image-content">
|
|
|
- <view class="image-box m-t20 r-10 m-r20" :key="index" @click="showImg(msgData.msg_img,pIndex)"
|
|
|
+ <view class="image-box m-t20 r-10 m-r20" :key="pIndex" @click.stop="showImg(msgData.msg_img,pIndex)"
|
|
|
v-for="(msgImg,pIndex) in msgData.msg_img">
|
|
|
<image class="image-item wh-110" :src="msgImg.type===1?msgImg.url:getVideoImg(msgImg.url)"
|
|
|
mode="aspectFill">
|
|
|
</image>
|
|
|
<image class="wh-45 video-icon" src="/static/img/task/play.png" mode="aspectFill"
|
|
|
- @click.stop="showVideoImg(item.url)" v-if="msgImg.type === 2">
|
|
|
+ @click.stop="showVideoImg(msgImg.url)" v-if="msgImg.type === 2">
|
|
|
</image>
|
|
|
<image class="delete-iocn wh-25" src="/page_task/static/img/information/hint-subtract.png" mode=""
|
|
|
@click.stop="shutImg(pIndex)"></image>
|
|
|
@@ -57,6 +57,11 @@
|
|
|
<view class="popup-row" @click="showUploadingImg(false)">取消</view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
+ <uni-popup ref="videoPopup" @change="closeVideoImg">
|
|
|
+ <view class="video-box" v-if="videoUrl">
|
|
|
+ <video class="myVideo" :src="videoUrl" :autoplay="true"></video>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -84,6 +89,7 @@
|
|
|
msg_img: [],
|
|
|
file_list: [],
|
|
|
},
|
|
|
+ videoUrl:''
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -95,9 +101,29 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- showImg(item, index) {
|
|
|
-
|
|
|
- },
|
|
|
+ closeVideoImg(e) {
|
|
|
+ if (!e.show) {
|
|
|
+ console.log('关闭视频了')
|
|
|
+ this.videoUrl = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showVideoImg(url){
|
|
|
+ this.videoUrl = url
|
|
|
+ this.$refs.videoPopup.open('center')
|
|
|
+ },
|
|
|
+ showImg(item, index) {
|
|
|
+ let imgList=[]
|
|
|
+ for (const imgListKey in this.msgData.msg_img) {
|
|
|
+ if(this.msgData.msg_img[imgListKey].type===1){
|
|
|
+ imgList.push(this.msgData.msg_img[imgListKey].url)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ uni.previewImage({
|
|
|
+ urls: imgList,
|
|
|
+ current: item.url,
|
|
|
+ success: () => {}
|
|
|
+ })
|
|
|
+ },
|
|
|
clickBut() {
|
|
|
console.log('------butClick--------------')
|
|
|
this.$emit('butClick')
|