index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <zzx-navbar :scrollable="false" :back="true" bgColor="linear-gradient( 180deg, #E8FF9B 0%, #F6F6F6 100%)"
  3. title="评价详情"></zzx-navbar>
  4. <view style="height:170rpx;"></view>
  5. <view class="content">
  6. <view class="m-comments-card" v-for="item in commentsList" :key="item.id">
  7. <view class="m-comments-name">
  8. <zzx-icon name="venue-icon4" size="14"></zzx-icon>
  9. <view class="name">{{item.address}}</view>
  10. <zzx-icon name="ashRight" size="12"></zzx-icon>
  11. </view>
  12. <view class="line"></view>
  13. <view class="m-user-info">
  14. <view class="user-info">
  15. <view class="user-header">
  16. <image :src="item.avatar" mode=""></image>
  17. </view>
  18. <view class="user-name">{{item.username}}</view>
  19. </view>
  20. <view class="user-time">{{item.createTime}}</view>
  21. </view>
  22. <view class="m-star">
  23. <view class="star">{{item.score.toFixed(1)}}</view>
  24. <uni-rate :readonly="true" size="16" :value="item.score" />
  25. </view>
  26. <view class="m-comments">
  27. {{item.evaluateContent}}
  28. </view>
  29. <view class="user-picture">
  30. <scroll-view class="scroll-view_H" scroll-x="true">
  31. <view class="scroll-view-item_H" v-for="(iamge,index) in item.imageList" :key="index">
  32. <image @click="_previewImage(item.imageList,iamge)" :src="iamge" mode=""></image>
  33. </view>
  34. </scroll-view>
  35. </view>
  36. <view class="f-merchants-reply" v-if="item.replyContent">
  37. <view class="merchants">商家回复</view>
  38. <view class="reply">
  39. <text :class="[switchOpen?'':'textHidden']">{{item.replyContent}}</text>
  40. <text class="open-colse" @click="switchOpen=!switchOpen">{{switchOpen?'收起':'展开'}}</text>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script lang="ts" setup>
  47. import { ref, onMounted, computed } from 'vue'
  48. import { RouterUtils, TipsUtils,_previewImage } from '@/utils/util';
  49. import { http } from '@/utils/http'
  50. import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
  51. const commentsList=ref()
  52. const switchOpen=ref(false)
  53. onMounted(()=>{
  54. get_findByPage()
  55. })
  56. const get_findByPage=()=>{
  57. http.get('/my/evaluate/findByPage',{data:{pageNo:1,pageSize:10}}).then((res)=>{
  58. commentsList.value=res.result.records
  59. })
  60. }
  61. </script>
  62. <style lang="less" scoped>
  63. .m-comments-card {
  64. padding: 20rpx;
  65. background: #FFFFFF;
  66. border-radius: 32rpx;
  67. margin-top: 20rpx;
  68. .m-comments-name {
  69. display: flex;
  70. align-items: center;
  71. gap: 16rpx;
  72. margin-bottom: 20rpx;
  73. .name {
  74. font-size: 28rpx;
  75. color: #222222;
  76. }
  77. }
  78. .m-user-info{
  79. display: flex;
  80. align-items: center;
  81. justify-content: space-between;
  82. .user-info{
  83. display: flex;
  84. align-items: center;
  85. gap: 16rpx;
  86. .user-header{
  87. &>image{
  88. width: 60rpx;
  89. height: 60rpx;
  90. border-radius: 50%;
  91. }
  92. }
  93. .user-name{
  94. font-weight: bold;
  95. font-size: 24rpx;
  96. color: #222222;
  97. }
  98. }
  99. .user-time{
  100. font-size: 24rpx;
  101. color: #AAAAAA;
  102. }
  103. }
  104. .m-star{
  105. display: flex;
  106. align-items: center;
  107. gap: 20rpx;
  108. font-size: 24rpx;
  109. color: #AAAAAA;
  110. }
  111. .m-comments{
  112. margin-top: 20rpx;
  113. font-size: 28rpx;
  114. color: #222222;
  115. }
  116. .user-picture{
  117. margin-top: 20rpx;
  118. .scroll-view_H{
  119. .scroll-view-item_H{
  120. &>image{
  121. width: 160rpx;
  122. height: 160rpx;
  123. border-radius: 8rpx;
  124. margin-right: 20rpx;
  125. }
  126. }
  127. }
  128. }
  129. .f-merchants-reply{
  130. display: flex;
  131. gap: 12rpx;
  132. background: #F6F6F6;
  133. border-radius: 16rpx;
  134. padding: 20rpx;
  135. margin-top: 20rpx;
  136. transition: all .3s;
  137. .merchants{
  138. width: 100rpx;
  139. height: 40rpx;
  140. font-size: 24rpx;
  141. color: #AAAAAA;
  142. }
  143. .reply{
  144. width: 520rpx;
  145. font-size: 24rpx;
  146. color: #222222;
  147. display: flex;
  148. .open-colse{
  149. color: #AAAAAA;
  150. width:120rpx;
  151. }
  152. }
  153. }
  154. }
  155. </style>