From b6e604f2449bb65dfaafb0f0741ba54ff0d2f9c2 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 30 四月 2024 15:20:03 +0800 Subject: [PATCH] 修改云端录像详情页使用直接访问zlm的方式播放录像 --- web_src/src/components/CloudRecordDetail.vue | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/web_src/src/components/CloudRecordDetail.vue b/web_src/src/components/CloudRecordDetail.vue index 551df6f..cd0bc3c 100755 --- a/web_src/src/components/CloudRecordDetail.vue +++ b/web_src/src/components/CloudRecordDetail.vue @@ -314,13 +314,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) } }, -- Gitblit v1.8.0