index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="evaluateWtapper" v-if="reply.length > 0">
  3. <view class="evaluateItem" v-for="(item, index) in reply" :key="index">
  4. <view class="pic-text acea-row">
  5. <view class="pictrue">
  6. <image :src="item.userAvatar"></image>
  7. </view>
  8. <view class="content">
  9. <view>
  10. <view class="acea-row row-between">
  11. <view class="acea-row">
  12. <view class="name line1">{{ item.userNickname }}</view>
  13. <view class="start" :class="'star' + item.scores"></view>
  14. </view>
  15. <view class="time">{{ formatDate(item.createTime) }}</view>
  16. </view>
  17. <view class="sku">规格:
  18. <text v-for="(property, propertyIndex) in item.skuProperties" :key="propertyIndex" style="padding-right: 2px">
  19. {{ property.valueName }}
  20. </text>
  21. </view>
  22. </view>
  23. <view class="evaluate-infor">{{ item.content }}</view>
  24. <view class="imgList acea-row" v-if="item.picUrls && item.picUrls.length > 0">
  25. <view class="pictrue" v-for="(picUrl, indexn) in item.picUrls" :key="indexn">
  26. <image :src="picUrl" class="image" @click='getpreviewImage(index, indexn)'></image>
  27. </view>
  28. </view>
  29. <view class="reply" v-if="item.replyContent">
  30. <text class="font-color">店小二</text>:{{ item.replyContent }}
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import dayjs from "@/plugin/dayjs/dayjs.min.js";
  39. export default {
  40. props: {
  41. reply: {
  42. type: Array,
  43. default: []
  44. }
  45. },
  46. data: function() {
  47. return {};
  48. },
  49. methods: {
  50. getpreviewImage: function(indexw, indexn) {
  51. uni.previewImage({
  52. urls: this.reply[indexw].picUrls,
  53. current: this.reply[indexw].picUrls[indexn]
  54. });
  55. },
  56. formatDate: function(date) {
  57. return dayjs(date).format("YYYY-MM-DD HH:mm:ss");
  58. }
  59. }
  60. }
  61. </script>
  62. <style scoped lang='scss'>
  63. .evaluateWtapper .evaluateItem {
  64. background-color: #fff;
  65. padding: 24rpx;
  66. border-bottom-left-radius: 14rpx;
  67. border-bottom-right-radius: 14rpx;
  68. }
  69. .evaluateWtapper .evaluateItem~.evaluateItem {
  70. border-top: 1rpx solid #f5f5f5;
  71. }
  72. .evaluateWtapper .evaluateItem .pic-text {
  73. font-size: 26rpx;
  74. color: #282828;
  75. .content{
  76. width: 84%;
  77. margin-left: 20rpx;
  78. }
  79. }
  80. .evaluateWtapper .evaluateItem .pic-text .pictrue {
  81. width: 62rpx;
  82. height: 62rpx;
  83. }
  84. .evaluateWtapper .evaluateItem .pic-text .pictrue image {
  85. width: 100%;
  86. height: 100%;
  87. border-radius: 50%;
  88. }
  89. .evaluateWtapper .evaluateItem .pic-text .name {
  90. max-width: 450rpx;
  91. }
  92. .evaluateWtapper .evaluateItem .time {
  93. font-size: 24rpx;
  94. color: #999999;
  95. }
  96. .sku{
  97. font-size: 24rpx;
  98. color: #999999;
  99. margin: 10rpx 0;
  100. }
  101. .evaluateWtapper .evaluateItem .evaluate-infor {
  102. font-size: 28rpx;
  103. color: #333;
  104. margin-bottom: 14rpx;
  105. }
  106. .evaluateWtapper .evaluateItem .imgList {/*
  107. padding: 0 24rpx;
  108. margin-top: 16rpx; */
  109. }
  110. .evaluateWtapper .evaluateItem .imgList .pictrue {
  111. width: 102rpx;
  112. height: 102rpx;
  113. margin-right: 14rpx;
  114. border-radius: 14rpx;
  115. margin-bottom: 16rpx;
  116. /* margin: 0 0 15rpx 15rpx; */
  117. }
  118. .evaluateWtapper .evaluateItem .imgList .pictrue image {
  119. width: 100%;
  120. height: 100%;
  121. background-color: #f7f7f7;
  122. border-radius: 14rpx;
  123. }
  124. .evaluateWtapper .evaluateItem .reply {
  125. font-size: 26rpx;
  126. color: #454545;
  127. background-color: #f7f7f7;
  128. border-radius: 14rpx;
  129. margin: 20rpx 30rpx 0 0rpx;
  130. padding: 20rpx;
  131. position: relative;
  132. }
  133. .evaluateWtapper .evaluateItem .reply::before {
  134. content: "";
  135. width: 0;
  136. height: 0;
  137. border-left: 20rpx solid transparent;
  138. border-right: 20rpx solid transparent;
  139. border-bottom: 30rpx solid #f7f7f7;
  140. position: absolute;
  141. top: -14rpx;
  142. left: 40rpx;
  143. }
  144. </style>