feedback.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view>
  3. <!-- 头部 -->
  4. <view class="head">
  5. <view class="location">
  6. 评价信箱<image class="loc" src="../../static/信封.svg" mode=""></image>
  7. </view>
  8. </view>
  9. <!-- 订单 -->
  10. <view class="main">
  11. <view class="content-list" v-for="(item,index) in feedbackList" :key="index">
  12. <text class="num">订单号:{{item.orderId}}</text>
  13. <view class="list">
  14. <view class="">
  15. 故障类型:{{item.repairsFault.faultName}}
  16. </view>
  17. <view class="p">
  18. 来自 ********* 的评价:
  19. </view>
  20. <view class="text">
  21. {{item.orderAdvice}}
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="isOver" v-if="flag" >
  27. ----我是有底线的----
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. feedbackList:[],
  36. pageNum:1,
  37. flag:false
  38. }
  39. },
  40. onLoad() {
  41. this.getfeedback()
  42. },
  43. methods: {
  44. onReachBottom(){
  45. console.log(this.feedbackList.length)
  46. console.log(this.pageNum*5)
  47. if(this.feedbackList.length<this.pageNum*5)
  48. return this.flag = true
  49. this.pageNum++
  50. this.getfeedback()
  51. },
  52. async getfeedback(){
  53. this.$http.post('/api/order/queryAllOrderByUserAdvice?pageNum='+this.pageNum).then(result=>{
  54. this.feedbackList =[...this.feedbackList,...result.data.list]
  55. console.log(result.data.list)
  56. },err=>{})
  57. }
  58. }
  59. }
  60. </script>
  61. <style>
  62. template{
  63. position: relative;
  64. }
  65. .main{
  66. position: relative;
  67. top: -96px;
  68. }
  69. .head{
  70. height: 149px;
  71. border-radius: 0px 0px 10px 10px;
  72. background-color: rgba(42, 130, 228, 1);
  73. }
  74. .head .location{
  75. padding-top: 18px;
  76. font-size: 15px;
  77. font-weight: bold;
  78. text-align: center;
  79. color:rgba(255, 255, 255, 1) ;
  80. }
  81. .loc{
  82. width: 20px;
  83. height: 20px;
  84. font-size: 12px;
  85. vertical-align:middle;
  86. }
  87. .num{
  88. float: left;
  89. margin-left: 10px;
  90. margin-top: 9px;
  91. font-size: 11px;
  92. font-weight: 700;
  93. color: rgba(42, 130, 228, 1);
  94. }
  95. .got{
  96. float: right;
  97. margin-top: 9px;
  98. margin-right: 9px;
  99. color: rgba(212, 48, 48, 1);
  100. }
  101. .list{
  102. float: left;
  103. margin-left: 21px;
  104. margin-top: 9px;
  105. font-size: 11px;
  106. color: rgba(80, 80, 80, 1);
  107. }
  108. .p{
  109. margin-top: 8px;
  110. }
  111. .list .text{
  112. width: 242px;
  113. height: 54px;
  114. margin-top: 15px;
  115. margin-left: 25px;
  116. text-align:center;
  117. line-height: 54px;
  118. background-color: rgba(255, 255, 255, 1);
  119. }
  120. .content-list{
  121. width: 359px;
  122. height: 173px;
  123. float: left;
  124. margin-left: 8px;
  125. margin-top:11px;
  126. border-radius: 14px 14px 0px 0px;
  127. background-color: rgba(229, 229, 229, 1);
  128. }
  129. .isOver{
  130. width: 100%;
  131. height: 50px;
  132. line-height: 50px;
  133. text-align: center;
  134. font-size: 12px;
  135. color: rgba(80, 80, 80, 0.27);
  136. }
  137. </style>