index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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="f-record-card" v-for="(item, index) in recordList" :key="item.id">
  7. <view class="f-user-info">
  8. <view class="user-info">
  9. <view class="user-header">
  10. <image :src="item.avatar" mode=""></image>
  11. </view>
  12. <view class="user-name">{{ item.userName }}</view>
  13. </view>
  14. <view class="user-time">{{ item.createTime }}</view>
  15. </view>
  16. <view class="user-tags">{{ item.feedbackName }}</view>
  17. <view class="user-des">
  18. {{ item.feedbackDescribed }}
  19. </view>
  20. <view class="user-picture">
  21. <scroll-view class="scroll-view_H" scroll-x="true">
  22. <view class="scroll-view-item_H" v-for="(img, index) in item.feedbackImgList" :key="index">
  23. <image @click="_previewImage(item.feedbackImgList, img)" :src="img" mode=""></image>
  24. </view>
  25. </scroll-view>
  26. </view>
  27. <view class="f-merchants-reply" v-if="item.replyContent">
  28. <view class="merchants">商家回复</view>
  29. <view class="reply">
  30. <text :class="[switchOpen ? '' : 'textHidden']">{{ item.replyContent }}</text>
  31. <text class="open-colse" @click="switchOpen = !switchOpen">{{ switchOpen ? '收起' : '展开' }}</text>
  32. </view>
  33. </view>
  34. </view>
  35. <zs-empty v-if="recordList?.length === 0" />
  36. </view>
  37. </template>
  38. <script lang="ts" setup>
  39. import { ref, onMounted } from 'vue'
  40. import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
  41. import zsEmpty from '@/components/zs-empty/index.vue';
  42. import { onLoad, onReachBottom } from '@dcloudio/uni-app';
  43. import { _previewImage } from '@/utils/util'
  44. import { http } from '@/utils/http'
  45. const switchOpen = ref(false);
  46. const recordList = ref();
  47. const pageNo = ref(1)
  48. onReachBottom(() => {
  49. pageNo.value++
  50. get_recordList()
  51. })
  52. onMounted(() => {
  53. get_recordList()
  54. })
  55. const get_recordList = () => {
  56. http.get('/my/feedback/findByPage', { data: { pageNo: pageNo.value, pageSize: 10 }, loading: true }).then((res) => {
  57. if (pageNo.value == 1) {
  58. recordList.value = res.result.records
  59. } else {
  60. recordList.value = recordList.value.concat(res.result.records)
  61. }
  62. })
  63. }
  64. </script>
  65. <style lang="less">
  66. .f-record-card {
  67. background: #FFFFFF;
  68. border-radius: 32rpx;
  69. padding: 20rpx;
  70. margin-top: 20rpx;
  71. .f-user-info {
  72. display: flex;
  73. align-items: center;
  74. justify-content: space-between;
  75. .user-info {
  76. display: flex;
  77. align-items: center;
  78. gap: 16rpx;
  79. .user-header {
  80. &>image {
  81. width: 60rpx;
  82. height: 60rpx;
  83. border-radius: 50%;
  84. }
  85. }
  86. .user-name {
  87. font-weight: bold;
  88. font-size: 24rpx;
  89. color: #222222;
  90. }
  91. }
  92. .user-time {
  93. font-size: 24rpx;
  94. color: #AAAAAA;
  95. }
  96. }
  97. .user-tags {
  98. background: #F5F5F5;
  99. border-radius: 8rpx;
  100. width: 152rpx;
  101. height: 48rpx;
  102. font-size: 28rpx;
  103. color: #AAAAAA;
  104. text-align: center;
  105. line-height: 48rpx;
  106. margin-top: 20rpx;
  107. }
  108. .user-des {
  109. margin-top: 16rpx;
  110. font-size: 28rpx;
  111. color: #222222;
  112. }
  113. .user-picture {
  114. margin-top: 20rpx;
  115. .scroll-view_H {
  116. .scroll-view-item_H {
  117. &>image {
  118. width: 160rpx;
  119. height: 160rpx;
  120. border-radius: 8rpx;
  121. margin-right: 20rpx;
  122. }
  123. }
  124. }
  125. }
  126. .f-merchants-reply {
  127. display: flex;
  128. gap: 12rpx;
  129. background: #F6F6F6;
  130. border-radius: 16rpx;
  131. padding: 20rpx;
  132. margin-top: 20rpx;
  133. transition: all .3s;
  134. .merchants {
  135. width: 100rpx;
  136. height: 40rpx;
  137. font-size: 24rpx;
  138. color: #AAAAAA;
  139. }
  140. .reply {
  141. width: 520rpx;
  142. font-size: 24rpx;
  143. color: #222222;
  144. display: flex;
  145. .open-colse {
  146. color: #AAAAAA;
  147. width: 120rpx;
  148. }
  149. }
  150. }
  151. }
  152. </style>