|
@@ -67,11 +67,12 @@
|
|
|
</template>
|
|
|
<template v-else-if="type_index === 2">
|
|
|
<video
|
|
|
- controls
|
|
|
+ class="sources-item-border"
|
|
|
:src="item.file_url"
|
|
|
width="100%"
|
|
|
height="140px"
|
|
|
:poster="item.video_preview_image_file_url"
|
|
|
+ preload="none"
|
|
|
></video>
|
|
|
</template>
|
|
|
<template v-else-if="type_index === 3">
|
|
@@ -107,7 +108,7 @@
|
|
|
<p class="name">
|
|
|
{{ item.name }}
|
|
|
<SvgIcon
|
|
|
- v-show="item.file_id && type_index === 3"
|
|
|
+ v-show="item.file_id && (type_index === 3 || type_index === 2)"
|
|
|
icon-class="uploadPreview"
|
|
|
size="16"
|
|
|
@click="viewDialog(item)"
|
|
@@ -618,10 +619,15 @@ export default {
|
|
|
// 预览
|
|
|
viewDialog(file) {
|
|
|
this.newpath = '';
|
|
|
- H5StartupFile({ file_id: file.file_id, index_file_name: 'index.html' }).then((res) => {
|
|
|
- this.newpath = res.file_url;
|
|
|
+ if (this.type_index === 3) {
|
|
|
+ H5StartupFile({ file_id: file.file_id, index_file_name: 'index.html' }).then((res) => {
|
|
|
+ this.newpath = res.file_url;
|
|
|
+ this.visible = true;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.newpath = `${this.file_preview_url}onlinePreview?url=${Base64.encode(file.file_url)}`;
|
|
|
this.visible = true;
|
|
|
- });
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
};
|