修改删除评论之后的显示逻辑

master
于肖磊 2026-02-13 10:23:01 +08:00
parent 85f1af5f86
commit eec8e82f31
3 changed files with 14 additions and 5 deletions

View File

@ -1390,16 +1390,25 @@
//
comment.sub_comments = filteredSubComments;
filteredComments.push(comment);
}
}
comment.comments_count = filteredSubComments.length;
//
} else {
//
filteredComments.push(comment);
}
}
//
this.video_data_list.forEach(item => {
if (item.id == this.current_video_id) {
item.comments_count = filteredComments.length;
}
})
// active_comments
this.active_comments = filteredComments;
this.setData({
active_comments: filteredComments,
video_data_list: this.video_data_list
})
}
},
//

View File

@ -36,7 +36,7 @@
<view class="video-date">{{ item.add_time_date }}</view>
<view class="video-likes flex-row align-c gap-4">
<iconfont name="icon-givealike-o-fine" size="24rpx"></iconfont>
<text>{{ item.access_count }}</text>
<text>{{ item.give_thumbs_count }}</text>
</view>
</view>
</view>

View File

@ -40,7 +40,7 @@
<view class="video-date">{{ item.add_time_date }}</view>
<view class="video-likes flex-row align-c gap-4">
<iconfont name="icon-givealike-o-fine" size="24rpx"></iconfont>
<text>{{ item.access_count }}</text>
<text>{{ item.give_thumbs_count }}</text>
</view>
</view>
</view>