From 2ae4226e89e21d998c78bd9859d6bc8ef1b5f713 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 30 四月 2024 15:45:39 +0800
Subject: [PATCH] 修复云端录像按年月查询时时间条件错误的BUG

---
 web_src/src/components/CloudRecordDetail.vue |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/web_src/src/components/CloudRecordDetail.vue b/web_src/src/components/CloudRecordDetail.vue
index 551df6f..9bf20cb 100755
--- a/web_src/src/components/CloudRecordDetail.vue
+++ b/web_src/src/components/CloudRecordDetail.vue
@@ -230,9 +230,6 @@
 		mounted() {
       this.recordListStyle.height = this.winHeight + "px";
       this.playerStyle["height"] = this.winHeight + "px";
-      console.log(this.app)
-      console.log(this.stream)
-      console.log(this.mediaServerId)
       // 鏌ヨ褰撳勾鏈夎棰戠殑鏃ユ湡
       this.getDateInYear(()=>{
         if (Object.values(this.dateFilesObj).length > 0){
@@ -314,13 +311,34 @@
         });
       },
       chooseFile(file){
+        console.log(file)
 			  if (file == null) {
           this.videoUrl = "";
           this.choosedFile = "";
         }else {
           this.choosedFile = file.fileName;
-          this.videoUrl = `${this.getFileBasePath(file)}/download/${this.app}/${this.stream}/${this.chooseDate}/${file.fileName}`
-          console.log(this.videoUrl)
+          this.$axios({
+            method: 'get',
+            url: `/api/cloud/record/play/path`,
+            params: {
+              recordId: file.id,
+            }
+          }).then((res) => {
+            console.log(res)
+            if (res.data.code === 0) {
+              if (location.protocol === "https:") {
+                this.videoUrl = res.data.data.httpsPath;
+              }else {
+                this.videoUrl = res.data.data.httpPath;
+              }
+            }
+          }).catch((error) => {
+            console.log(error);
+          });
+          //
+          //
+          // this.videoUrl = `${this.getFileBasePath(file)}/download/${this.app}/${this.stream}/${this.chooseDate}/${file.fileName}`
+          // console.log(this.videoUrl)
         }
 
       },
@@ -328,7 +346,7 @@
         this.$router.back()
       },
       getFileShowName(item) {
-          return  moment.unix(item.startTime).format('HH:mm:ss') + "-" + moment.unix(item.endTime).format('HH:mm:ss')
+          return  moment(item.startTime).format('HH:mm:ss') + "-" + moment(item.endTime).format('HH:mm:ss')
       },
       chooseMediaChange() {
 

--
Gitblit v1.8.0