瑶都万能墙
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.

119 lines
2.2 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="comment" @click="navigateToSubComment(item)">
  3. <view class="box">
  4. <view class="headPortraitimg">
  5. <image :src="item.userHead"
  6. @click.stop="previewImage([item.userHead])"
  7. mode="aspectFill"></image>
  8. </view>
  9. <view class="YaoduUniversalWall">
  10. <view class="heide">
  11. <view class="username text-ellipsis">
  12. {{ item.userName }}
  13. </view>
  14. </view>
  15. <view class="Times">
  16. <view class="TimeMonth">
  17. {{ item.createTime }}发布
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="dynamics" v-html="$utils.stringFormatHtml(item.userValue)">
  23. </view>
  24. <view class="images">
  25. <view class="image"
  26. @click.stop="previewImage(images, i)"
  27. :key="i" v-for="(img, i) in images">
  28. <image :src="img" mode="aspectFill"></image>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. props : ['item', 'parentId', 'sourceType', 'sourceId'],
  36. data() {
  37. return {
  38. }
  39. },
  40. computed : {
  41. images(){
  42. if(!this.item.userImage){
  43. return []
  44. }
  45. return this.item.userImage.split(',')
  46. },
  47. },
  48. methods: {
  49. // 导航到子评论详情
  50. navigateToSubComment(comment) {
  51. uni.navigateTo({
  52. url: `/pages_order/comment/commentDetail?id=${comment.id}&parentId=${this.parentId}&sourceType=${this.sourceType}&sourceId=${this.sourceId}`
  53. });
  54. },
  55. }
  56. }
  57. </script>
  58. <style scoped lang="scss">
  59. .comment {
  60. background-color: #fff;
  61. padding: 30rpx 40rpx;
  62. margin-top: 10rpx;
  63. .box {
  64. display: flex;
  65. align-items: center;
  66. .headPortraitimg {
  67. width: 80rpx;
  68. height: 80rpx;
  69. border-radius: 15rpx;
  70. overflow: hidden;
  71. image {
  72. width: 100%;
  73. height: 100%;
  74. }
  75. }
  76. .YaoduUniversalWall {
  77. padding: 0rpx 10rpx;
  78. font-size: 26rpx;
  79. line-height: 40rpx;
  80. .Times {
  81. font-size: 22rpx;
  82. }
  83. }
  84. }
  85. .dynamics {
  86. margin-top: 20rpx;
  87. margin-left: 100rpx;
  88. font-size: 28rpx;
  89. letter-spacing: 3rpx;
  90. word-break: break-all;
  91. }
  92. .images {
  93. display: flex;
  94. flex-wrap: wrap;
  95. margin-top: 20rpx;
  96. margin-left: 100rpx;
  97. .image {
  98. margin: 10rpx;
  99. image {
  100. height: 120rpx;
  101. width: 120rpx;
  102. border-radius: 20rpx;
  103. }
  104. }
  105. }
  106. }
  107. </style>