// components/comment-item/comment-item.js // 评论项组件 Component({ properties: { comment: { type: Object, value: {} }, showArticle: { type: Boolean, value: false } }, methods: { onAvatarTap() { const comment = this.data.comment if (comment && comment.userId) { wx.navigateTo({ url: `/pages/user-profile/user-profile?userId=${comment.userId}` }) } }, onReply() { this.triggerEvent('reply', { comment: this.data.comment }) }, onLike() { this.triggerEvent('like', { comment: this.data.comment }) }, onArticleTap() { const comment = this.data.comment if (comment && comment.articleId) { wx.navigateTo({ url: `/pages/article-detail/article-detail?id=${comment.articleId}` }) } } } }) /** * @联系作者:16768118056 * @描述:(此项目非免费分享)源码百分百可用,搞定毕设不发愁,支持远程调试安装、二次开发、定制、讲解、文档类。 * @访问:https://www.notmaker.com/detail/8326a897119d4542896c863a69d7bbe7/gtt20260415,查看完整运行演示。 */