index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="evaluateWtapper">
  3. <view class="evaluateItem" v-for="(item, indexw) in reply" :key="indexw">
  4. <view class="pic-text acea-row row-middle">
  5. <view class="pictrue">
  6. <image :src="item.avatar ? item.avatar : '/static/images/f.png'"></image>
  7. </view>
  8. <view class="acea-row row-middle">
  9. <view class="name line1">{{ item.nickname }}</view>
  10. <view class="start" :style="'width:'+(item.rate/5)*124+'rpx;background-image: url('+domain+'/static/diy/score2'+keyColor+'.png)'"></view>
  11. </view>
  12. </view>
  13. <view class="time">{{ item.create_time }} {{ item.sku ? item.sku : '' }}</view>
  14. <view class="evaluate-infor">{{ item.comment }}</view>
  15. <view class="imgList acea-row">
  16. <view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn" @click='getpreviewImage(indexw, indexn)'>
  17. <easy-loadimage :image-src="itemn"></easy-loadimage>
  18. <!-- <image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image> -->
  19. <!-- <view v-else class="image loadfail-img"></view> -->
  20. <!-- <text v-if="item.pics.length>4 && indexn == 3" class="morePic">+{{item.pics.length-4}}</text> -->
  21. </view>
  22. </view>
  23. <view class="reply" v-if="item.merchant_reply_content">
  24. <text>店小二</text>{{item.merchant_reply_content}}
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. // +----------------------------------------------------------------------
  31. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  32. // +----------------------------------------------------------------------
  33. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  34. // +----------------------------------------------------------------------
  35. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  36. // +----------------------------------------------------------------------
  37. // | Author: CRMEB Team <admin@crmeb.com>
  38. // +----------------------------------------------------------------------
  39. import { mapGetters } from "vuex";
  40. import { HTTP_REQUEST_URL } from '@/config/app';
  41. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
  42. export default {
  43. props: {
  44. reply: {
  45. type: Array,
  46. default: () => []
  47. }
  48. },
  49. computed: mapGetters(['keyColor']),
  50. components: {
  51. easyLoadimage
  52. },
  53. data: function() {
  54. return {
  55. domain: HTTP_REQUEST_URL
  56. };
  57. },
  58. methods: {
  59. getpreviewImage: function(indexw, indexn) {
  60. console.log(this.reply)
  61. uni.previewImage({
  62. urls: this.reply[indexw].pics,
  63. current: this.reply[indexw].pics[indexn]
  64. });
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss">
  70. .evaluateWtapper .evaluateItem {
  71. background-color: #fff;
  72. padding-bottom: 25rpx;
  73. }
  74. .evaluateWtapper .evaluateItem~.evaluateItem {
  75. border-top: 1px solid #f5f5f5;
  76. }
  77. .evaluateWtapper .evaluateItem .pic-text {
  78. font-size: 26rpx;
  79. color: #282828;
  80. height: 95rpx;
  81. padding: 0 30rpx;
  82. }
  83. .evaluateWtapper .evaluateItem .pic-text .pictrue {
  84. width: 56rpx;
  85. height: 56rpx;
  86. margin-right: 20rpx;
  87. }
  88. .evaluateWtapper .evaluateItem .pic-text .pictrue image {
  89. width: 100%;
  90. height: 100%;
  91. border-radius: 50%;
  92. }
  93. .evaluateWtapper .evaluateItem .pic-text .name {
  94. max-width: 450rpx;
  95. margin-right: 15rpx;
  96. }
  97. .evaluateWtapper .evaluateItem .time {
  98. font-size: 24rpx;
  99. color: #82848f;
  100. padding: 0 30rpx;
  101. }
  102. .evaluateWtapper .evaluateItem .evaluate-infor {
  103. font-size: 28rpx;
  104. color: #282828;
  105. margin-top: 19rpx;
  106. padding: 0 30rpx;
  107. }
  108. .evaluateWtapper .evaluateItem .imgList {
  109. padding: 0 30rpx 0 15rpx;
  110. margin-top: 25rpx;
  111. }
  112. .evaluateWtapper .evaluateItem .imgList .pictrue {
  113. width: 160rpx;
  114. height: 160rpx;
  115. margin: 0 0 15rpx 15rpx;
  116. position: relative;
  117. /deep/.easy-loadimage,/deep/uni-image,/deep/image{
  118. width: 160rpx;
  119. height: 160rpx;
  120. }
  121. }
  122. .evaluateWtapper .evaluateItem .imgList .morePic{
  123. position: absolute;
  124. width: 160rpx;
  125. height: 160rpx;
  126. color: #ffffff;
  127. font-size: 40rpx;
  128. text-align: center;
  129. top: 0;
  130. left: 0;
  131. background: rgba(0,0,0,.5);
  132. padding-top: 50rpx;
  133. box-sizing: border-box;
  134. }
  135. .evaluateWtapper .evaluateItem .reply {
  136. font-size: 26rpx;
  137. color: #454545;
  138. background-color: #f7f7f7;
  139. border-radius: 5rpx;
  140. margin: 20rpx 30rpx 0 30rpx;
  141. padding: 30rpx;
  142. position: relative;
  143. text{
  144. color: var(--view-theme);
  145. }
  146. }
  147. .evaluateWtapper .evaluateItem .reply::before {
  148. content: "";
  149. width: 0;
  150. height: 0;
  151. border-left: 20rpx solid transparent;
  152. border-right: 20rpx solid transparent;
  153. border-bottom: 30rpx solid #f7f7f7;
  154. position: absolute;
  155. top: -30rpx;
  156. left: 40rpx;
  157. }
  158. .start{
  159. position: relative;
  160. top: 4rpx;
  161. }
  162. .star_purple{
  163. background: url(../../pages/columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
  164. }
  165. </style>