circleList.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view class="circle">
  3. <view @click="itemClick(item)" v-for="(item,index) in list" :key="index" class="circle-item">
  4. <view class="circle-item-top">
  5. <view class="circle-item-top-img">
  6. <image style="width: 100%;height: 100%;" :src="item.img" mode=""></image>
  7. </view>
  8. <view class="circle-item-top-text">
  9. <view class="circle-item-top-text-top">
  10. {{item.name}}
  11. </view>
  12. <view class="circle-item-top-text-bottom">
  13. {{item.stu}}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="circle-item-content">
  18. {{item.content}}
  19. </view>
  20. <view class="circle-item-img">
  21. <view @click.stop="img(item,index1)" :key="index1" v-for="(item1,index1) in item.imgArr " class="circle-item-img-dom">
  22. <image style="width: 100%;height: 100%;border-radius: 10rpx;" :src="item1" mode=""></image>
  23. </view>
  24. </view>
  25. <view class="circle-item-bottom">
  26. <view class="circle-item-bottom-left">
  27. <image style="width: 30rpx;height: 30rpx;margin-right: 10rpx;" src="@/static/image/date.png"
  28. mode=""></image> {{item.date}}
  29. </view>
  30. <view class="circle-item-bottom-right">
  31. <image style="width: 30rpx;height: 30rpx;margin-right: 10rpx;" src="@/static/image/review.png" mode=""></image>
  32. <text style="margin-right: 10rpx;">{{item.review}}</text>
  33. <uni-icons style="margin-right: 10rpx;" color="#999" type="heart " size="16"></uni-icons>
  34. <uni-icons style="margin-right: 10rpx;" color="rgba(5,204,161,1)" type="heart-filled" size="16"></uni-icons>
  35. {{item.giveLike}}
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. name: "circleList",
  44. props: {
  45. list: {
  46. type: Array,
  47. default: () => []
  48. }
  49. },
  50. data() {
  51. return {
  52. };
  53. },
  54. methods: {
  55. img(item, index1) {
  56. uni.previewImage({
  57. urls: item.imgArr,
  58. current: index1, // 当前显示图片的http链接,默认是第一个
  59. })
  60. },
  61. itemClick(item){
  62. this.$emit('itemClick',item)
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .circle {
  69. width: 100%;
  70. box-sizing: border-box;
  71. .circle-item {
  72. width: 100%;
  73. box-sizing: border-box;
  74. padding: 32rpx;
  75. background: #ffffff;
  76. border-radius: 5.33px;
  77. box-shadow: 0px 0px 6.67px 0px rgba(147, 147, 147, 0.20);
  78. margin-bottom: 32rpx;
  79. .circle-item-bottom {
  80. display: flex;
  81. justify-content: space-between;
  82. .circle-item-bottom-left {
  83. display: flex;
  84. align-items: center;
  85. color: #999;
  86. }
  87. .circle-item-bottom-right {
  88. display: flex;
  89. align-items: center;
  90. color: #999;
  91. }
  92. }
  93. .circle-item-img {
  94. display: flex;
  95. flex-wrap: wrap;
  96. .circle-item-img-dom {
  97. width: 190rpx;
  98. height: 190rpx;
  99. margin-right: 29rpx;
  100. margin-bottom: 29rpx;
  101. }
  102. .circle-item-img-dom:nth-child(3n) {
  103. margin-right: 0;
  104. }
  105. }
  106. .circle-item-content {
  107. padding: 24rpx 0;
  108. }
  109. .circle-item-top {
  110. display: flex;
  111. .circle-item-top-img {
  112. width: 100rpx;
  113. height: 100rpx;
  114. margin-right: 24rpx;
  115. }
  116. .circle-item-top-text {
  117. .circle-item-top-text-top {
  118. font-size: 32rpx;
  119. margin-bottom: 10rpx;
  120. }
  121. .circle-item-top-text-bottom {
  122. color: #999;
  123. font-size: 24rpx;
  124. }
  125. }
  126. }
  127. }
  128. }
  129. </style>