From 78c2b5a63d4ceecee63362de8a23733aafb01d6b Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 30 四月 2024 15:36:32 +0800
Subject: [PATCH] 修复云端录像详情页时间显示错误
---
web_src/src/components/CloudRecordDetail.vue | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/web_src/src/components/CloudRecordDetail.vue b/web_src/src/components/CloudRecordDetail.vue
index a3b1bc6..90b29c3 100755
--- a/web_src/src/components/CloudRecordDetail.vue
+++ b/web_src/src/components/CloudRecordDetail.vue
@@ -135,7 +135,7 @@
<script>
// TODO 鏍规嵁鏌ヨ鐨勬椂闂村垪琛ㄨ缃粦杞ㄧ殑鏈�澶у�间笌鏈�灏忓�硷紝
import uiHeader from '../layout/UiHeader.vue'
- import player from './dialog/easyPlayer.vue'
+ import player from './common/easyPlayer.vue'
import moment from 'moment'
import axios from "axios";
export default {
@@ -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)
}
},
@@ -328,7 +349,10 @@
this.$router.back()
},
getFileShowName(item) {
- return moment.unix(item.startTime).format('HH:mm:ss') + "-" + moment.unix(item.endTime).format('HH:mm:ss')
+ console.log("getFileShowName")
+ console.log(item.startTime)
+ console.log(item.endTime)
+ return moment(item.startTime).format('HH:mm:ss') + "-" + moment(item.endTime).format('HH:mm:ss')
},
chooseMediaChange() {
--
Gitblit v1.8.0