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.

169 lines
3.2 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months 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. <text class="name">匿名用户</text>
  12. <text class="server-name">皇家尊享spa</text>
  13. </view>
  14. <view class="peview-time">
  15. {{ item.createTime }}
  16. </view>
  17. </view>
  18. </view>
  19. <view class="more">
  20. <van-icon name="weapp-nav" size="40rpx" color="#DDDADA" />
  21. </view>
  22. </view>
  23. <view class="mark">
  24. <van-rate v-model="item.serviceNum" size="25rpx" color="#FCD618" />
  25. <text class="desc">{{ getSatisfaction(item.serviceNum) }}</text>
  26. </view>
  27. <view class="tags">
  28. <view class="tag" v-for="(t) in item.labelText.split(',')">
  29. {{ t }}
  30. </view>
  31. </view>
  32. <view class="comment-content">
  33. <view class="content">
  34. {{ item.content }}
  35. </view>
  36. <!-- <view class="like already-liked">
  37. {{ item.num | 0 }}
  38. <van-icon v-if="false" name="good-job-o" />
  39. <van-icon name="good-job-o" color="#FC9A37" size="40rpx" />
  40. </view> -->
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data() {
  48. return {
  49. mark: 3
  50. }
  51. },
  52. props: {
  53. list: {
  54. type: Array,
  55. default: function() {
  56. return []
  57. }
  58. }
  59. },
  60. methods: {
  61. //获取满意度
  62. getSatisfaction(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. display: flex;
  97. align-items: center;
  98. font-size: 30rpx;
  99. .server-name {
  100. background: #FEF4F5;
  101. color: #EF8D95;
  102. font-size: 20rpx;
  103. padding: 8rpx 15rpx;
  104. border-radius: 5rpx;
  105. }
  106. }
  107. .peview-time {
  108. font-size: 24rpx;
  109. color: #D1CDCD;
  110. }
  111. }
  112. }
  113. }
  114. .mark {
  115. display: flex;
  116. align-items: center;
  117. .desc {
  118. margin-left: 5rpx;
  119. color: #D1CDCD;
  120. font-size: 26rpx;
  121. }
  122. }
  123. .tags {
  124. padding-top: 15rpx;
  125. display: flex;
  126. .tag {
  127. background: #ECFCF1;
  128. color: #55B16E;
  129. font-size: 22rpx;
  130. padding: 5rpx 20rpx;
  131. border-radius: 10rpx;
  132. margin-right: 5px;
  133. }
  134. }
  135. .comment-content {
  136. font-size: 22rpx;
  137. margin-top: 15rpx;
  138. .content {
  139. color: #474441;
  140. }
  141. .like {
  142. display: flex;
  143. color: #BDBCBC;
  144. justify-content: flex-end;
  145. align-items: center;
  146. padding: 10rpx 0rpx;
  147. }
  148. .already-liked {
  149. color: #FC9A37;
  150. }
  151. }
  152. }
  153. }
  154. </style>