From 3d68b56bb5ecbc3d34b2901c671dc7f1f0f82f74 Mon Sep 17 00:00:00 2001
From: pedoc <pedoc@qq.com>
Date: 星期一, 29 一月 2024 18:05:17 +0800
Subject: [PATCH] 修复未配置sipdomain时出现异常

---
 web_src/src/components/CloudRecord.vue |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/web_src/src/components/CloudRecord.vue b/web_src/src/components/CloudRecord.vue
index ca963e6..4a4a74b 100755
--- a/web_src/src/components/CloudRecord.vue
+++ b/web_src/src/components/CloudRecord.vue
@@ -213,10 +213,26 @@
       console.log(row)
       this.chooseRecord = row;
       this.showPlayer = true;
-      let videoPath = row.filePath.substring(row.filePath.length - 25);
-      console.log(videoPath)
-      this.videoUrl = `${this.getFileBasePath(row)}/download/${row.app}/${row.stream}/${videoPath}`
-      console.log(this.videoUrl)
+      this.$axios({
+        method: 'get',
+        url: `/api/cloud/record/play/path`,
+        params: {
+          recordId: row.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;
+          }
+          console.log(222 )
+          console.log(this.videoUrl )
+        }
+      }).catch((error) => {
+        console.log(error);
+      });
     },
       getFileBasePath(item) {
           let basePath = ""

--
Gitblit v1.8.0