minMember.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image src="../../static/img/tgbg.png" mode=""></image>
  5. <view class="top-val">
  6. {{allMun || 0}}<text>人</text>
  7. </view>
  8. </view>
  9. <scroll-view scroll-y="true" :style="{'height': height}" class="list" @scrolltolower="loadData()">
  10. <empty v-if="list.length == 0" ></empty>
  11. <view class="apply-item flex" v-for="item in list">
  12. <view class="item-left flex">
  13. <image src="" mode="" class="item-img"></image>
  14. <view class="item-info flex">
  15. <view class="name flex">
  16. <view class="">
  17. 假猪套
  18. </view>
  19. <image src="../../static/img/lv02.png" mode=""></image>
  20. <image src="../../static/img/lv03.png" mode=""></image>
  21. <image src="../../static/img/lv04.png" mode=""></image>
  22. </view>
  23. <view class="phone">
  24. 13245678911
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <uni-load-more :status="loadingType"></uni-load-more>
  30. <view class="btn-jg"></view>
  31. </scroll-view>
  32. <!-- <view class="btn-jg"></view> -->
  33. <!-- <view class="btn-wrapper">
  34. <navigator url="./applyList">
  35. <view class="btm-btn">
  36. 申请列表
  37. </view>
  38. </navigator>
  39. </view> -->
  40. </view>
  41. </template>
  42. <script>
  43. import empty from '@/components/empty';
  44. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  45. import {getMyTvillage} from '@/api/user.js'
  46. export default {
  47. components: {
  48. empty,
  49. uniLoadMore
  50. },
  51. data() {
  52. return {
  53. height: '',
  54. list: [],
  55. loaded: false,
  56. loadingType: 'more',
  57. page: 1,
  58. limit: 10,
  59. allMun: 0,
  60. }
  61. },
  62. onReady(res) {
  63. var _this = this;
  64. uni.getSystemInfo({
  65. success: resu => {
  66. const query = uni.createSelectorQuery();
  67. query.select('.list').boundingClientRect();
  68. query.exec(function(res) {
  69. console.log(res, 'ddddddddddddd');
  70. _this.height = resu.windowHeight - res[0].top + 'px';
  71. console.log('打印页面的剩余高度', _this.height);
  72. });
  73. },
  74. fail: res => {}
  75. });
  76. },
  77. onLoad() {
  78. this.loadData()
  79. },
  80. methods: {
  81. loadData() {
  82. let obj = this
  83. if(obj.loadingType == 'loading') {
  84. return
  85. }
  86. if(obj.loadingType == 'noMore') {
  87. return
  88. }
  89. getMyTvillage({
  90. page: obj.page,
  91. limit: obj.limit
  92. }).then(res => {
  93. console.log(res)
  94. })
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. .top {
  101. width: 750rpx;
  102. height: 400rpx;
  103. position: relative;
  104. image {
  105. width: 100%;
  106. height: 100%;
  107. position: absolute;
  108. top: 0;
  109. }
  110. .top-val {
  111. width: 100%;
  112. height: 100%;
  113. line-height:400rpx;
  114. text-align: center;
  115. font-size: 72rpx;
  116. font-family: PingFang SC;
  117. font-weight: bold;
  118. color: #FF4C4C;
  119. position: absolute;
  120. top: 0;
  121. text {
  122. font-size: 36rpx;
  123. }
  124. }
  125. }
  126. .btn-wrapper {
  127. width: 100%;
  128. height: 116rpx;
  129. z-index: 99;
  130. position: fixed;
  131. bottom: 0;
  132. left: 0;
  133. right: 0;
  134. margin: auto;
  135. background-color: #fff;
  136. .btm-btn {
  137. margin: 0 auto;
  138. width: 674rpx;
  139. height: 88rpx;
  140. background: #FF4C4C;
  141. border-radius: 44rpx;
  142. text-align: center;
  143. line-height: 88rpx;
  144. font-size: 36rpx;
  145. font-family: PingFang SC;
  146. font-weight: 500;
  147. color: #FFFFFF;
  148. }
  149. }
  150. .btn-jg {
  151. height: 116rpx;
  152. }
  153. .list {
  154. height: 100%;
  155. // position: relative;
  156. // background-color: red;
  157. .apply-item {
  158. background-color: #fff;
  159. height: 130rpx;
  160. border-bottom: 1px solid #F0F0F0;
  161. padding: 0 35rpx 0 20rpx;
  162. &:last-child {
  163. border: none;
  164. }
  165. .item-left {
  166. .item-img {
  167. height: 80rpx;
  168. width: 80rpx;
  169. border-radius: 80rpx;
  170. background-color: red;
  171. }
  172. .item-info {
  173. height: 80rpx;
  174. flex-direction: column;
  175. padding-left: 20rpx;
  176. justify-content: space-around;
  177. align-items: flex-start;
  178. line-height: 1;
  179. .name {
  180. font-size: 30rpx;
  181. font-family: PingFangSC;
  182. font-weight: 500;
  183. color: #3F454B;
  184. }
  185. .phone {
  186. font-size: 22rpx;
  187. font-family: PingFang SC;
  188. font-weight: 400;
  189. color: #999999;
  190. }
  191. }
  192. }
  193. .item-btn {
  194. .err-btn {
  195. width: 98rpx;
  196. height: 47rpx;
  197. border: 1px solid #000000;
  198. border-radius: 5rpx;
  199. line-height: 47rpx;
  200. text-align: center;
  201. font-size: 24rpx;
  202. font-family: PingFang SC;
  203. font-weight: 500;
  204. color: #333333;
  205. }
  206. .pas-btn {
  207. width: 98rpx;
  208. height: 47rpx;
  209. background: linear-gradient(-35deg, #F8DD4F, #FBEB77);
  210. border-radius: 5rpx;
  211. line-height: 47rpx;
  212. text-align: center;
  213. font-size: 24rpx;
  214. font-family: PingFang SC;
  215. font-weight: 500;
  216. color: #333333;
  217. margin-left: 10rpx;
  218. }
  219. }
  220. .item-right {
  221. line-height: 129rpx;
  222. font-size: 24rpx;
  223. font-family: PingFang SC;
  224. font-weight: 400;
  225. color: #999999;
  226. }
  227. }
  228. }
  229. </style>