From ff46cc24356b2cd2f23ab3cd7892e61b682d2b8c Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Mon, 11 May 2026 10:03:42 +0800
Subject: [PATCH] 主线提交
---
src/views/components/upload.vue | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/views/components/upload.vue b/src/views/components/upload.vue
index e1563e6..ca523be 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 ? 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 = file.path;
const link = document.createElement("a");
link.href = url;
link.download = file.name;
@@ -341,7 +341,7 @@
}))
uploadChunks(fileChunkList)
- loading.value = false
+
}
//文件分片
@@ -435,6 +435,8 @@
uploadedCount.value=uploadedCount.value+1
fileChunkList.value[data.get('index')].percentage=100 //手动更新进度
console.log(uploadedCount.value,'result--------------')
+ }else {
+ loading.value = false
}
resolve('done')
})
@@ -453,11 +455,10 @@
if(filetype == 'mp4' || filetype == 'MP4'){
container.showVideo = true
await nextTick(() => {
-
console.log("myPlayer.value",myPlayer.value)
myPlayer.value.src(
{
- src:"http://192.168.2.16:9000/trainexam/"+data.data.path,
+ src: data.data.url,
type: 'application/x-mpegURL',
})
// myPlayer.value.load()
@@ -480,9 +481,10 @@
emit("getFile",file)
-
+ loading.value = false
ElMessage.success("上传成功")
}else{
+ loading.value = false
ElMessage.success("合并数据失败")
}
}
--
Gitblit v1.9.2