From 411d3c272c5bff654e068ec1e5bf32ac892bd669 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 03 六月 2025 11:45:02 +0800
Subject: [PATCH] 视频主页架子

---
 pages/tabbar/index/home.vue |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/pages/tabbar/index/home.vue b/pages/tabbar/index/home.vue
index d3b82cc..d6a2f29 100644
--- a/pages/tabbar/index/home.vue
+++ b/pages/tabbar/index/home.vue
@@ -8,7 +8,7 @@
       :current="currentIndex"
       @change="onSwiperChange"
     >
-      <swiper-item v-for="(item, index) in videoList" :key="item.id">
+      <swiper-item v-for="(item, index) in videoList" :key="item.id + index">
 		<!-- 鎾斁鎸夐挳锛堜粎褰撹棰戞殏鍋滄椂鏄剧ず锛� -->
 		<view 
 		  class="play-icon" 
@@ -66,14 +66,14 @@
 		  </view>
           <view style="width: 100%;word-wrap: break-word;white-space: normal;overflow-wrap: break-word;">
 			  <text class="video-title">{{item.title}}</text>
-			  <text class="video-tag" v-for="(tag, index) in item.tagList" :key="tag">#{{tag.tagName}}</text>
+			  <text class="video-tag" v-for="(tag, index) in item.tagList" :key="item.id + tag.id">#{{tag.tagName}}</text>
 		  </view>
         </view>
         
         <!-- 鍙充晶浜掑姩鎸夐挳 -->
        <view class="action-buttons">
 		   <view class="avatar-container">
-			   <image class="avatar" :src="item.authorAvatar" mode="aspectFill"></image>
+			   <image class="avatar" @click="() => jumpToHomePage(item.authorId)" :src="item.authorAvatar" mode="aspectFill"></image>
 			   <!-- 鍏虫敞鍥炬爣 - 浣跨敤缁濆瀹氫綅 -->
 			   <view v-if="!item.subscribeThisAuthor" class="follow-icon" @click="subscribeAuth(index, item.authorId)">
 				 <text class="iconfont">&#xe629;</text>
@@ -114,7 +114,7 @@
 	        鏆傛棤璇勮锛屽揩鏉ュ彂琛ㄧ涓�鏉¤瘎璁哄惂~
 	      </view>
 	      
-	      <view v-else class="comment-item" v-for="(comment, index) in comments" :key="comment.id">
+	      <view v-else class="comment-item" v-for="(comment, index) in comments" :key="comment.id + index">
 			<view style="display: flex;">
 				<image class="comment-avatar" :src="comment.userAvatar || '/static/default-avatar.png'"></image>
 				<view class="comment-content">
@@ -130,7 +130,7 @@
 			</view>
 			<!-- 鍥炲鍒楄〃 -->
 			  <view class="reply-list" v-if="comment.replies && comment.replies.length > 0">
-				<view class="reply-item" v-for="(reply, replyIndex) in comment.replies" :key="reply.id">
+				<view class="reply-item" v-for="(reply, replyIndex) in comment.replies" :key="reply.id + index">
 				  <view class="reply-content">
 					<view style="display: flex;">
 						<image class="comment-reply-avatar" :src="reply.replyUserAvatar || '/static/default-avatar.png'"></image>
@@ -251,6 +251,12 @@
     this.initVideoContexts();
   },
   methods: {
+		// 璺宠浆涓汉涓婚〉
+		jumpToHomePage(authorId) {
+			uni.navigateTo({
+				url: "/pages/video/home-page?authorId=" + authorId
+			})
+		},
 		// 鍙栨秷鐐硅禐
 		async cancelThumbsUp(id, commentIndex, replyIndex) {
 			const data = {

--
Gitblit v1.8.0