小说小程序前端代码仓库(小程序)
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.

112 lines
1.9 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. uni.navigateTo({
  29. url: '/pages_order/comment/respondComments?id=' + item.id
  30. })
  31. },
  32. }
  33. }
  34. </script>
  35. <style scoped lang="scss">
  36. .comment-card {
  37. display: flex;
  38. align-items: flex-start;
  39. margin-bottom: 32rpx;
  40. .avatar {
  41. width: 56rpx;
  42. height: 56rpx;
  43. border-radius: 50%;
  44. margin-right: 16rpx;
  45. flex-shrink: 0;
  46. }
  47. .comment-main {
  48. flex: 1;
  49. display: flex;
  50. flex-direction: column;
  51. margin-left: 10rpx;
  52. }
  53. .comment-header {
  54. display: flex;
  55. align-items: center;
  56. gap: 12rpx;
  57. margin-bottom: 4rpx;
  58. }
  59. .username {
  60. font-size: 26rpx;
  61. color: #222;
  62. font-weight: 500;
  63. }
  64. .from {
  65. font-size: 22rpx;
  66. color: #bdbdbd;
  67. }
  68. .comment-content {
  69. font-size: 26rpx;
  70. color: #333;
  71. margin-bottom: 12rpx;
  72. }
  73. .comment-footer {
  74. display: flex;
  75. align-items: center;
  76. font-size: 22rpx;
  77. color: #bdbdbd;
  78. justify-content: space-between;
  79. padding-right: 8rpx;
  80. }
  81. .comment-time {
  82. color: #bdbdbd;
  83. }
  84. .reply-btn-wrap {
  85. display: flex;
  86. align-items: center;
  87. cursor: pointer;
  88. }
  89. .reply-btn {
  90. color: #223a6b;
  91. font-weight: 500;
  92. margin-left: 0;
  93. font-size: 24rpx;
  94. }
  95. .history-section {
  96. margin-top: 24rpx;
  97. }
  98. }
  99. </style>