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.

159 lines
2.9 KiB

1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="review-list">
  3. <view v-for="(item,index) in list" :key="index" class="review-item">
  4. <view class="user-info">
  5. <view class="left box-s">
  6. <view class="img-box">
  7. <image src="" mode="aspectFill"></image>
  8. </view>
  9. <view class="user-name-and-time box-s">
  10. <view class="user-name">
  11. 匿名用户
  12. </view>
  13. <view class="peview-time">
  14. {{ item.createTime }}
  15. </view>
  16. </view>
  17. </view>
  18. <view class="more">
  19. <van-icon name="weapp-nav" size="40rpx" color="#DDDADA" />
  20. </view>
  21. </view>
  22. <view class="mark">
  23. <van-rate v-model="item.serviceNum" size="25rpx" color="#FCD618" />
  24. <text class="desc">{{ getSatisfaction(item.serviceNum) }}</text>
  25. </view>
  26. <view class="tags">
  27. <view class="tag" v-for="(t) in item.labelText.split(',')">
  28. {{ t }}
  29. </view>
  30. </view>
  31. <view class="comment-content">
  32. <view class="content">
  33. {{ item.content }}
  34. </view>
  35. <!-- <view class="like already-liked">
  36. {{ item.num | 0 }}
  37. <van-icon v-if="false" name="good-job-o" />
  38. <van-icon name="good-job-o" color="#FC9A37" size="40rpx" />
  39. </view> -->
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. mark: 3
  49. }
  50. },
  51. props: {
  52. list: {
  53. type: Array,
  54. default: function() {
  55. return []
  56. }
  57. }
  58. },
  59. methods: {
  60. //获取满意度
  61. getSatisfaction(num){
  62. console.log(num);
  63. let satisfaction = ['不满意','不满意','较满意','满意','非常满意']
  64. return satisfaction[num - 1]
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss">
  70. .review-list {
  71. .box-s {
  72. box-sizing: border-box;
  73. }
  74. .review-item {
  75. background: #F5F5F5;
  76. padding: 15rpx 25rpx;
  77. border-radius: 15rpx;
  78. margin-bottom: 20rpx;
  79. .user-info {
  80. display: flex;
  81. .left {
  82. width: calc(100% - 40rpx);
  83. display: flex;
  84. .img-box {
  85. width: 100rpx;
  86. height: 100rpx;
  87. background: #ccc;
  88. border-radius: 50rpx;
  89. }
  90. .user-name-and-time {
  91. display: flex;
  92. flex-direction: column;
  93. justify-content: space-around;
  94. padding: 10rpx 15rpx;
  95. .user-name {
  96. font-size: 30rpx;
  97. }
  98. .peview-time {
  99. font-size: 24rpx;
  100. color: #D1CDCD;
  101. }
  102. }
  103. }
  104. }
  105. .mark {
  106. display: flex;
  107. align-items: center;
  108. .desc {
  109. margin-left: 5rpx;
  110. color: #D1CDCD;
  111. font-size: 26rpx;
  112. }
  113. }
  114. .tags {
  115. padding-top: 15rpx;
  116. display: flex;
  117. .tag {
  118. background: #ECFCF1;
  119. color: #55B16E;
  120. font-size: 22rpx;
  121. padding: 5rpx 20rpx;
  122. border-radius: 10rpx;
  123. margin-right: 5px;
  124. }
  125. }
  126. .comment-content {
  127. font-size: 22rpx;
  128. margin-top: 15rpx;
  129. .content {
  130. color: #474441;
  131. }
  132. .like {
  133. display: flex;
  134. color: #BDBCBC;
  135. justify-content: flex-end;
  136. align-items: center;
  137. padding: 10rpx 0rpx;
  138. }
  139. .already-liked {
  140. color: #FC9A37;
  141. }
  142. }
  143. }
  144. }
  145. </style>