tousuList.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view>
  3. <view class="bonus-main">
  4. <view class="list-item " v-if="dataList.length>0" :show-arrow="false" v-for="(item, index) in dataList"
  5. :key="index">
  6. <view class="list-item-wrap margin-top-sm">
  7. <view class="padding-tb-sm" v-if="item.image">
  8. <swiper class="screen-swiper" style="height: 260rpx;" :circular="true" :autoplay="true"
  9. duration="800">
  10. <swiper-item v-for="(item,index) in item.image" :key="index"
  11. @click="saveImg(item.image,index)">
  12. <image :src="item" mode="aspectFit" class="radius"></image>
  13. </swiper-item>
  14. </swiper>
  15. </view>
  16. <view style="padding: 20rpx 30rpx;">
  17. <view>投诉类型:{{item.typeName}}</view>
  18. <view class="list-title" style="color: #333;margin-top: 10upx;" v-if="item.title">投诉标题:{{ item.title }}</view>
  19. <view class="list-title" style="color: #333;margin-top: 10upx;" v-if="item.content">投诉内容:{{ item.content }}</view>
  20. <view class="list-title" style="margin-top: 10upx;color: #333;" v-if="item.byUserName">
  21. 被投诉人:{{ item.byUserName }}</view>
  22. <view style="display: flex;justify-content: space-between;margin-top: 10rpx;">
  23. <view>
  24. <text style="color: #333;" v-if="item.createAt">投诉时间:{{ item.createAt }}</text>
  25. </view>
  26. </view>
  27. <view class="list-title" style="margin-top: 10upx;color: #333;" v-if="item.type==0">状态:待审核
  28. </view>
  29. <view class="list-title" style="margin-top: 10upx;color: #333;" v-if="item.type==1">状态:已处理
  30. </view>
  31. <view class="list-title" style="margin-top: 10upx;color: #333;" v-if="item.type==2">状态:已驳回
  32. </view>
  33. <view class="list-title" style="margin-top: 10upx;color: #333"
  34. v-if="item.type==2 && item.auditContent">
  35. 驳回内容:{{ item.auditContent }}</view>
  36. <view class="list-title" style="margin-top: 10upx;color: #333"
  37. v-if="item.type==1 && item.auditContent">
  38. 处理内容:{{ item.auditContent }}</view>
  39. </view>
  40. </view>
  41. </view>
  42. <empty v-if="dataList.length === 0" des="暂无记录" show="false"></empty>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import empty from '../../components/empty.vue'
  48. export default {
  49. components: {
  50. empty
  51. },
  52. data() {
  53. return {
  54. page: 1,
  55. limit: 10,
  56. count: 0,
  57. dataList: []
  58. }
  59. },
  60. onLoad() {
  61. this.tousuList()
  62. },
  63. onShow() {
  64. },
  65. methods: {
  66. copyClick(copy) {
  67. uni.setClipboardData({
  68. data: copy,
  69. success: function(res) {
  70. uni.getClipboardData({
  71. success: function(res) {
  72. uni.showToast({
  73. title: "复制成功",
  74. icon: 'none',
  75. });
  76. },
  77. });
  78. },
  79. });
  80. },
  81. // 查看图片
  82. saveImg(imgs, index) {
  83. if (this.LBSelect) {
  84. if (index == this.LBIndex - 1) {
  85. return;
  86. }
  87. }
  88. // console.log(imgs)
  89. let that = this;
  90. let imgArr = imgs
  91. // imgArr.push(imgs);
  92. // //预览图片
  93. uni.previewImage({
  94. urls: imgArr,
  95. current: imgArr[index]
  96. });
  97. },
  98. // get page limit state 3
  99. tousuList() {
  100. let data = {
  101. page: this.page,
  102. limit: this.limit,
  103. state: 7
  104. }
  105. this.$Request.get('/app/message/selectMessageByUserId', data).then(res => {
  106. if (res.code == 0) {
  107. if (this.page == 1) {
  108. this.dataList = res.data.list
  109. for (let i = 0; i < this.dataList.length; i++) {
  110. if (this.dataList[i].image) {
  111. this.dataList[i].image = this.dataList[i].image.split(",");
  112. }
  113. }
  114. } else {
  115. this.dataList = [...this.dataList, ...res.data.list]
  116. for (let i = 0; i < this.dataList.length; i++) {
  117. if (this.dataList[i].image) {
  118. this.dataList[i].image = this.dataList[i].image.split(",");
  119. }
  120. }
  121. }
  122. this.count = res.data.totalCount
  123. }
  124. })
  125. }
  126. },
  127. onReachBottom: function() {
  128. if (this.count == this.dataList.length) {
  129. uni.showToast({
  130. title: '已经到底了',
  131. icon: 'none'
  132. })
  133. return
  134. } else {
  135. this.page = this.page + 1;
  136. this.tousuList()
  137. }
  138. },
  139. onPullDownRefresh: function() {
  140. this.page = 1;
  141. this.tousuList()
  142. },
  143. }
  144. </script>
  145. <style>
  146. page {
  147. background-color: #F7F7F7;
  148. }
  149. .bg {
  150. background: #FFFFFF;
  151. }
  152. .list-item {
  153. background: #FFFFFF;
  154. border-radius: 16rpx;
  155. margin: 0 20rpx 20rpx 20rpx;
  156. }
  157. .img1 {
  158. width: 100%;
  159. height: 400rpx;
  160. }
  161. .img2 {
  162. width: 210rpx;
  163. height: 210rpx;
  164. margin-top: 15rpx;
  165. margin-right: 5rpx;
  166. margin-left: 15rpx;
  167. }
  168. </style>