|
@@ -40,10 +40,9 @@
|
|
|
>
|
|
>
|
|
|
<el-image
|
|
<el-image
|
|
|
class="image-content"
|
|
class="image-content"
|
|
|
- :src="item.url"
|
|
|
|
|
|
|
+ :src="item.fileType === 1002 ? require('@/assets/img/video.jpg') : item.url"
|
|
|
fit="cover"
|
|
fit="cover"
|
|
|
lazy
|
|
lazy
|
|
|
- :preview-src-list="isEditMode || item.fileType === 1002 ? [] : [item.url]"
|
|
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
<div v-if="item.fileType === 1002" class="video-badge">
|
|
<div v-if="item.fileType === 1002" class="video-badge">
|
|
@@ -96,9 +95,10 @@
|
|
|
<div class="video-body">
|
|
<div class="video-body">
|
|
|
<video
|
|
<video
|
|
|
ref="videoPlayer"
|
|
ref="videoPlayer"
|
|
|
- :src="currentVideoItem.url"
|
|
|
|
|
|
|
+ :src="currentVideoItem.videoUrl"
|
|
|
controls
|
|
controls
|
|
|
playsinline
|
|
playsinline
|
|
|
|
|
+ autoplay
|
|
|
webkit-playsinline
|
|
webkit-playsinline
|
|
|
class="mobile-video-player"
|
|
class="mobile-video-player"
|
|
|
/>
|
|
/>
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
groupDataByDate(flatList) {
|
|
groupDataByDate(flatList) {
|
|
|
const groups = {}
|
|
const groups = {}
|
|
|
flatList.forEach(item => {
|
|
flatList.forEach(item => {
|
|
|
- const date = item.updateTime.split(' ')[0]
|
|
|
|
|
|
|
+ const date = item.createAt.split(' ')[0]
|
|
|
if (!groups[date]) groups[date] = []
|
|
if (!groups[date]) groups[date] = []
|
|
|
groups[date].push(item)
|
|
groups[date].push(item)
|
|
|
})
|
|
})
|
|
@@ -193,11 +193,25 @@ export default {
|
|
|
if (this.isEditMode) {
|
|
if (this.isEditMode) {
|
|
|
this.handleSelect(item.fileId)
|
|
this.handleSelect(item.fileId)
|
|
|
} else {
|
|
} else {
|
|
|
- if (item.fileType === 1002) {
|
|
|
|
|
|
|
+ if (item.fileType === 1001) {
|
|
|
|
|
+ const imageUrls = []
|
|
|
|
|
+ imageUrls.push({
|
|
|
|
|
+ src: item.url,
|
|
|
|
|
+ alt: item.filename
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$viewerApi({
|
|
|
|
|
+ images: imageUrls,
|
|
|
|
|
+ options: {
|
|
|
|
|
+ initialViewIndex: 0,
|
|
|
|
|
+ movable: true,
|
|
|
|
|
+ fullscreen: false,
|
|
|
|
|
+ keyboard: true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (item.fileType === 1002) {
|
|
|
this.currentVideoItem = item
|
|
this.currentVideoItem = item
|
|
|
this.showPlayerModal = true
|
|
this.showPlayerModal = true
|
|
|
}
|
|
}
|
|
|
- // 如果是普通图片,el-image 上的 preview-src-list 会自动接管实现原生全屏缩放预览
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|