|
@@ -325,7 +325,7 @@ export default {
|
|
|
file_id_list: [],
|
|
|
file_list: [],
|
|
|
loading: false,
|
|
|
- acceptFileTypeList: ['.jpg,.png,.jpeg', '.mp3', '.mp4', '.zip', '.fbx,.obj,.gltf,.glb', '.txt'],
|
|
|
+ acceptFileTypeList: ['.jpg,.png,.jpeg', '.mp3', '.mp4', '.zip,.html', '.fbx,.obj,.gltf,.glb', '.txt'],
|
|
|
limit: 10,
|
|
|
uploadTip: '',
|
|
|
boxLoading: false,
|
|
@@ -649,10 +649,16 @@ export default {
|
|
|
viewDialog(file) {
|
|
|
this.newpath = '';
|
|
|
if (this.type_index === 3) {
|
|
|
- H5StartupFile({ file_id: file.file_id, index_file_name: 'index.html' }).then((res) => {
|
|
|
- this.newpath = res.file_url;
|
|
|
+ const suffix = file.name.slice(file.name.lastIndexOf('.') + 1, file.name.length).toLowerCase();
|
|
|
+ if (suffix === 'html') {
|
|
|
+ this.newpath = file.file_url;
|
|
|
this.visible = true;
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ H5StartupFile({ file_id: file.file_id, index_file_name: 'index.html' }).then((res) => {
|
|
|
+ this.newpath = res.file_url;
|
|
|
+ this.visible = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
} else if (this.type_index === 4) {
|
|
|
this.visible3D = true;
|
|
|
this.loadModel(file.file_id);
|