小说小程序前端代码仓库(小程序)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
2.0 KiB

  1. <template>
  2. <view class="comment-card">
  3. <uv-avatar :src="item.hanHaiMember.headImage" size="44" shape="circle" class="avatar" />
  4. <view class="comment-main">
  5. <view class="comment-header">
  6. <text class="username">{{ item.hanHaiMember.nickName }}</text>
  7. <text class="from">来自{{ item.commonShop.name }}</text>
  8. </view>
  9. <view class="comment-content">{{ item.comment }}</view>
  10. <view class="comment-footer">
  11. <text class="comment-time">{{ item.createTime }}</text>
  12. <view class="reply-btn-wrap" @click="goToReply(item)">
  13. <text class="reply-btn">回复</text>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. props: ['item'],
  22. data() {
  23. return {
  24. }
  25. },
  26. methods: {
  27. goToReply(item) {
  28. // this.$fetch('updateCommentRead', {
  29. // commentId : item.id,
  30. // })
  31. uni.navigateTo({
  32. url: '/pages_order/comment/respondComments?id=' + item.id
  33. })
  34. },
  35. }
  36. }
  37. </script>
  38. <style scoped lang="scss">
  39. .comment-card {
  40. display: flex;
  41. align-items: flex-start;
  42. margin-bottom: 32rpx;
  43. .avatar {
  44. width: 56rpx;
  45. height: 56rpx;
  46. border-radius: 50%;
  47. margin-right: 16rpx;
  48. flex-shrink: 0;
  49. }
  50. .comment-main {
  51. flex: 1;
  52. display: flex;
  53. flex-direction: column;
  54. margin-left: 10rpx;
  55. }
  56. .comment-header {
  57. display: flex;
  58. align-items: center;
  59. gap: 12rpx;
  60. margin-bottom: 4rpx;
  61. }
  62. .username {
  63. font-size: 26rpx;
  64. color: #222;
  65. font-weight: 500;
  66. }
  67. .from {
  68. font-size: 22rpx;
  69. color: #bdbdbd;
  70. }
  71. .comment-content {
  72. font-size: 26rpx;
  73. color: #333;
  74. margin-bottom: 12rpx;
  75. }
  76. .comment-footer {
  77. display: flex;
  78. align-items: center;
  79. font-size: 22rpx;
  80. color: #bdbdbd;
  81. justify-content: space-between;
  82. padding-right: 8rpx;
  83. }
  84. .comment-time {
  85. color: #bdbdbd;
  86. }
  87. .reply-btn-wrap {
  88. display: flex;
  89. align-items: center;
  90. cursor: pointer;
  91. }
  92. .reply-btn {
  93. color: #223a6b;
  94. font-weight: 500;
  95. margin-left: 0;
  96. font-size: 24rpx;
  97. }
  98. .history-section {
  99. margin-top: 24rpx;
  100. }
  101. }
  102. </style>