From f761c20fed6b4da3c8f7c9ee857c6ba18caf1893 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期四, 29 五月 2025 18:15:11 +0800 Subject: [PATCH] 视频评论增加被回复人头像字段 --- pages/tabbar/index/home.vue | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pages/tabbar/index/home.vue b/pages/tabbar/index/home.vue index 66dbb7d..2a9bde6 100644 --- a/pages/tabbar/index/home.vue +++ b/pages/tabbar/index/home.vue @@ -132,6 +132,7 @@ <view class="reply-item" v-for="reply in comment.replies" :key="reply.id"> <view class="reply-content"> <view style="display: flex;"> + <image class="comment-reply-avatar" :src="reply.replyUserAvatar || '/static/default-avatar.png'"></image> <text class="nickname">{{reply.userNickname}}</text> <text v-if="reply.replyUserId && reply.masterCommentId !== reply.replyId" class="reply-to"><text style="margin-right: 10rpx;font-size: 28rpx;" class="iconfont"></text>{{reply.replyUserNickname}}</text> </view> @@ -145,14 +146,14 @@ </view> </view> <view class="view-more-replies" v-if="comment.replyTotalCount > 0 && !comment.expandReply" @click="loadRepliesPage(comment, index)"> - 灞曞紑{{comment.replyTotalCount}}鏉″洖澶� 鈫� + <text class="line">鈥斺��</text>灞曞紑{{comment.replyTotalCount}}鏉″洖澶� 鈫� </view> <view class="reply-op" v-if="comment.replyTotalCount > replyCommentQuery.pageNumber * replyCommentQuery.pageSize && comment.expandReply"> - <view @click="loadNextPageReply(index)" class="reply-op-item">灞曞紑鏇村<text class="iconfont textSideIcon"></text></view> + <view @click="loadNextPageReply(index)" class="reply-op-item"><text class="line">鈥斺��</text>灞曞紑鏇村<text class="iconfont textSideIcon"></text></view> <view @click="retractReplyComment(index)" class="reply-op-item" style="margin-left: 50rpx;">鏀惰捣<text class="iconfont textSideIcon"></text></view> </view> <view class="reply-op" v-else-if="comment.replyTotalCount <= replyCommentQuery.pageNumber * replyCommentQuery.pageSize && comment.expandReply"> - <view @click="retractReplyComment(index)" class="reply-op-item">鏀惰捣<text class="iconfont textSideIcon"></text></view> + <view @click="retractReplyComment(index)" class="reply-op-item"><text class="line">鈥斺��</text>鏀惰捣<text class="iconfont textSideIcon"></text></view> </view> </view> </scroll-view> @@ -200,6 +201,7 @@ replyId: '', replyUserId: '', replyUserNickname: '', + replyUserAvatar: '', masterCommentId: '' }, comments: [], // 璇勮鍒楄〃 @@ -277,11 +279,12 @@ const videoId = this.commentForm.videoId; this.commentForm = { // 璇勮琛ㄥ崟鏁版嵁 id: '', - videoId: videoId, + videoId: '', commentContent: '', replyId: '', replyUserId: '', replyUserNickname: '', + replyUserAvatar: '', masterCommentId: '' } }, @@ -298,6 +301,7 @@ this.commentForm.replyId = comment.id; this.commentForm.replyUserId = comment.userId; this.commentForm.replyUserNickname = comment.userNickname; + this.commentForm.replyUserAvatar = comment.userAvatar; // 鑷姩鑱氱劍杈撳叆妗� this.$nextTick(() => { const input = this.$refs.commentInput; @@ -804,7 +808,7 @@ .comment-item { display: flex; flex-direction: column; - padding: 10rpx 0; + padding: 10rpx 0 20rpx 0; } .comment-avatar { @@ -812,6 +816,12 @@ height: 70rpx; border-radius: 50%; margin-right: 10rpx; + } + .comment-reply-avatar { + width: 40rpx; + height: 40rpx; + border-radius: 50%; + margin-right: 10rpx; } .comment-content { @@ -887,6 +897,7 @@ .reply-op-item { display: flex; align-items: center; + height: 40rpx; } .reply-item { @@ -942,4 +953,8 @@ font-size: 36rpx; margin-left: 5rpx; } + .line { + margin-right: 10rpx; + color: #cccccc; + } </style> \ No newline at end of file -- Gitblit v1.8.0