applyList.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="content">
  3. <view style="height: 20rpx;"></view>
  4. <scroll-view scroll-y="true" class="list-wrapper" :style="{'height':height}" @scrolltolower="loadData()">
  5. <empty v-if="loaded && list.length == 0"></empty>
  6. <view class="apply-item flex" v-for="item in list">
  7. <view class="item-left flex">
  8. <image src="" mode="" class="item-img"></image>
  9. <view class="item-info flex">
  10. <view class="name">
  11. 假猪套
  12. </view>
  13. <view class="phone">
  14. 13245678911
  15. </view>
  16. </view>
  17. </view>
  18. <view class="item-btn flex">
  19. <view class="err-btn">
  20. 拒绝
  21. </view>
  22. <view class="pas-btn">
  23. 通过
  24. </view>
  25. </view>
  26. <!-- <view class="item-right">
  27. 已拒绝
  28. </view> -->
  29. </view>
  30. <uni-load-more :status="loadingType" v-if="list !=0"></uni-load-more>
  31. </scroll-view>
  32. </view>
  33. </template>
  34. <script>
  35. import empty from '@/components/empty';
  36. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  37. export default {
  38. components: {
  39. empty,
  40. uniLoadMore
  41. },
  42. data(){
  43. return {
  44. list: [1,2,3],
  45. loaded: false,
  46. loadingType: 'more',
  47. page: 1,
  48. limit: 15,
  49. height: '',//滚动区域高度
  50. }
  51. },
  52. onReady(res) {
  53. var _this = this;
  54. uni.getSystemInfo({
  55. success: resu => {
  56. const query = uni.createSelectorQuery();
  57. query.select('.list-wrapper').boundingClientRect();
  58. query.exec(function(res) {
  59. console.log(res, 'ddddddddddddd');
  60. _this.height = resu.windowHeight - res[0].top + 'px';
  61. console.log('打印页面的剩余高度', _this.height);
  62. });
  63. },
  64. fail: res => {}
  65. });
  66. },
  67. onLoad () {
  68. this.loadData()
  69. },
  70. methods: {
  71. loadData() {
  72. let obj = this
  73. if(obj.loadingType == 'loading') {
  74. return
  75. }
  76. if(obj.loadingType == 'noMore') {
  77. return
  78. }
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .list-wrapper {
  85. // padding: 20rpx 20rpx 0;
  86. background-color: #f8f6f6;
  87. }
  88. .apply-item {
  89. background-color: #fff;
  90. height: 130rpx;
  91. border-bottom: 1px solid #F0F0F0;
  92. padding: 0 35rpx 0 20rpx;
  93. &:last-child {
  94. border: none;
  95. }
  96. .item-left {
  97. .item-img {
  98. height: 80rpx;
  99. width: 80rpx;
  100. border-radius: 80rpx;
  101. background-color: red;
  102. }
  103. .item-info {
  104. height: 80rpx;
  105. flex-direction: column;
  106. padding-left: 20rpx;
  107. justify-content: space-around;
  108. align-items: flex-start;
  109. line-height: 1;
  110. .name {
  111. font-size: 30rpx;
  112. font-family: PingFangSC;
  113. font-weight: 500;
  114. color: #3F454B;
  115. }
  116. .phone {
  117. font-size: 22rpx;
  118. font-family: PingFang SC;
  119. font-weight: 400;
  120. color: #999999;
  121. }
  122. }
  123. }
  124. .item-btn {
  125. .err-btn {
  126. width: 98rpx;
  127. height: 47rpx;
  128. border: 1px solid #000000;
  129. border-radius: 5rpx;
  130. line-height: 47rpx;
  131. text-align: center;
  132. font-size: 24rpx;
  133. font-family: PingFang SC;
  134. font-weight: 500;
  135. color: #333333;
  136. }
  137. .pas-btn {
  138. width: 98rpx;
  139. height: 47rpx;
  140. background: linear-gradient(-35deg, #F8DD4F, #FBEB77);
  141. border-radius: 5rpx;
  142. line-height: 47rpx;
  143. text-align: center;
  144. font-size: 24rpx;
  145. font-family: PingFang SC;
  146. font-weight: 500;
  147. color: #333333;
  148. margin-left: 10rpx;
  149. }
  150. }
  151. .item-right {
  152. line-height: 129rpx;
  153. font-size: 24rpx;
  154. font-family: PingFang SC;
  155. font-weight: 400;
  156. color: #999999;
  157. }
  158. }
  159. </style>