From 79f08099c190a78beb676c6895804530739c2a0b Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 29 十一月 2024 14:48:35 +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