From 4f6cdee3d3a9967b6955aacc354bf557430c0643 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期一, 05 八月 2024 17:05:16 +0800 Subject: [PATCH] 批改 --- src/views/components/upload.vue | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/components/upload.vue b/src/views/components/upload.vue index e1563e6..036dc1a 100644 --- a/src/views/components/upload.vue +++ b/src/views/components/upload.vue @@ -83,7 +83,7 @@ autoplay:true,//自动播放 sources: [ { - src: resourcePath.value ? "http://192.168.2.16:9000/trainexam/" + resourcePath.value : '', + src: resourcePath.value ? import.meta.env.VITE_APP_RESOURCE_API + resourcePath.value : '', // src:'', type: 'application/x-mpegURL', } @@ -153,7 +153,7 @@ const view = (file) => { console.log('vlco',file) // console.log("点击文件=>", file); - const url = 'http://192.168.2.16:9000/trainexam/' + file.path; + const url = import.meta.env.VITE_APP_RESOURCE_API + file.path; const link = document.createElement("a"); link.href = url; link.download = file.name; @@ -341,7 +341,7 @@ })) uploadChunks(fileChunkList) - loading.value = false + } //文件分片 @@ -457,7 +457,7 @@ console.log("myPlayer.value",myPlayer.value) myPlayer.value.src( { - src:"http://192.168.2.16:9000/trainexam/"+data.data.path, + src: import.meta.env.VITE_APP_RESOURCE_API +data.data.path, type: 'application/x-mpegURL', }) // myPlayer.value.load() @@ -480,7 +480,7 @@ emit("getFile",file) - + loading.value = false ElMessage.success("上传成功") }else{ ElMessage.success("合并数据失败") -- Gitblit v1.9.2