From e15dbdbc396f61a645c8d8a504b45476f1fcea08 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 30 五月 2025 17:16:17 +0800
Subject: [PATCH] 评论点赞功能

---
 pages/tabbar/video/video.vue |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/pages/tabbar/video/video.vue b/pages/tabbar/video/video.vue
index d003daf..edab4fc 100644
--- a/pages/tabbar/video/video.vue
+++ b/pages/tabbar/video/video.vue
@@ -207,6 +207,7 @@
 		id: '',
         title: '',
 		videoFileKey: '',
+		videoDuration: 0,
 		videoFit: 'cover',
         goodsId: '',
         tags: [],
@@ -260,7 +261,7 @@
   },
   methods: {
 	  // 鑾峰彇鎺ㄨ崘鏍囩
-	  getRecommendTags(type) {
+	  async getRecommendTags(type) {
 		  const params = {
 			  tagName: this.tagInput.trim(),
 			  searchType: type
@@ -274,7 +275,6 @@
 		  console.log("鎵ц浜�");
 		  // 璋冪敤鍚庣鑾峰彇sts涓存椂璁块棶鍑瘉
 		  getSTSToken().then(res => {
-			  console.log(res, "sts缁撴瀯");
 			  const COS = require('@/lib/cos-wx-sdk-v5.js'); // 寮�鍙戞椂浣跨敤
 			  // const COS = require('./lib/cos-wx-sdk-v5.min.js'); // 涓婄嚎鏃朵娇鐢ㄥ帇缂╁寘
 			  
@@ -308,20 +308,21 @@
 			if(fileName.indexOf('%') > -1) {
 				fileName = decodeURIComponent(fileName);
 			}
-          const fileKey = getFileKey(fileName);
-		  this.videoInfo = {
-			url: res.tempFilePath,
-		    fileKey: fileKey,
-		    fileType: fileKey.split('/')[0],
-		    fileSize: res.size,
-		    originalFileName: fileName,
-		    cover: ''
-		  };
-		  this.formData.videoFileKey = fileKey;
-		  // 鍒ゆ柇瑙嗛鐨勫~鍏呮ā寮�
-		  this.formData.videoFit = this.calculateVideoFit(res.width, res.height)
+			const fileKey = getFileKey(fileName);
+		   this.videoInfo = {
+			 url: res.tempFilePath,
+			 fileKey: fileKey,
+			 fileType: fileKey.split('/')[0],
+			 fileSize: res.size,
+			 originalFileName: fileName,
+			 cover: ''
+		   };
+		   this.formData.videoFileKey = fileKey;
+		   this.formData.videoDuration = res.duration;
+		   // 鍒ゆ柇瑙嗛鐨勫~鍏呮ā寮�
+		   this.formData.videoFit = this.calculateVideoFit(res.width, res.height)
 		  
-		  this.cosClient.uploadFile({
+		   this.cosClient.uploadFile({
 		        Bucket: this.bucket,
 		        Region: this.region,
 		        Key: fileKey,
@@ -496,6 +497,7 @@
 			    title: '',
 				videoFileKey: '',
 				videoFit: 'cover',
+				videoDuration: 0,
 			    goodsId: '',
 			    tags: [],
 			    fileInfo: {}

--
Gitblit v1.8.0