zjcdetail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <template>
  2. <view class="content">
  3. <view class="v-top">
  4. <image src="../../static/img/zjc-bg.png" mode="" class="top-bg"></image>
  5. <view class="top-num">
  6. {{all || 0}}
  7. </view>
  8. </view>
  9. <scroll-view class="scorll-wrap" scroll-y @scrolltolower="loadData" :style="{'height': height}">
  10. <!-- 空白页 -->
  11. <!-- <empty v-if="loaded == true && list.length === 0"></empty> -->
  12. <!-- 订单列表 -->
  13. <view v-for="(item, index) in list" :key="index" class="order-item flex">
  14. <view class="title-box flex_item">
  15. <view class="title-avatar"><image :src="item.avatar"></image></view>
  16. <view class="list_tpl">
  17. <view class="title">
  18. <text>{{ item.nickname }}</text>
  19. </view>
  20. <view class="time">
  21. <text>{{ item.phone | phone}}</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
  27. </scroll-view>
  28. </view>
  29. </template>
  30. <script>
  31. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  32. import empty from '@/components/empty';
  33. import {
  34. getPoolDetail
  35. } from '@/api/pool.js'
  36. export default {
  37. data() {
  38. return {
  39. all: '',
  40. height: '',
  41. list: [],
  42. loadingType: 'more',
  43. page: 1,
  44. limit: 10,
  45. loaded: true,
  46. type: 0,
  47. name: ''
  48. }
  49. },
  50. filters: {
  51. phone(val) {
  52. let str = ''
  53. if(val) {
  54. val = "" + val;
  55. str = val.substr(0,3) + "****" + val.substr(7)
  56. }
  57. return str
  58. }
  59. },
  60. components: {
  61. uniLoadMore,
  62. empty
  63. },
  64. onLoad(opt) {
  65. this.name = opt.name
  66. this.type = opt.type
  67. uni.setNavigationBarTitle({
  68.   title:this.name
  69. })
  70. this.loadData()
  71. },
  72. onReady(res) {
  73. var _this = this;
  74. uni.getSystemInfo({
  75. success: resu => {
  76. const query = uni.createSelectorQuery();
  77. query.select('.scorll-wrap').boundingClientRect();
  78. query.exec(function(res) {
  79. _this.height = resu.windowHeight - res[0].top + 'px';
  80. console.log('打印页面的剩余高度', _this.height);
  81. });
  82. },
  83. fail: res => {}
  84. });
  85. },
  86. methods: {
  87. loadData() {
  88. let obj =this
  89. getPoolDetail({
  90. type: obj.type
  91. }).then(({data}) => {
  92. obj.list = data.item.data
  93. obj.all = data.total_amount
  94. })
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. .v-top {
  101. // position: relative;
  102. height: 470rpx;
  103. width: 750rpx;
  104. .top-bg {
  105. position: absolute;
  106. width: 750rpx;
  107. height: 470rpx;
  108. }
  109. .top-num {
  110. position: relative;
  111. padding-top: 200rpx;
  112. font-size: 72rpx;
  113. font-family: PingFang SC;
  114. font-weight: bold;
  115. color: #fff;
  116. text-align: center;
  117. }
  118. }
  119. .scorll-wrap {
  120. // background-color: red;
  121. }
  122. .order-item {
  123. // margin-top: 20rpx;
  124. padding: 20rpx 30rpx;
  125. line-height: 1.5;
  126. .title-box {
  127. width: 100%;
  128. .title-avatar{
  129. width: 100rpx;
  130. height: 100rpx;
  131. margin-right: 25rpx;
  132. image{
  133. width: 100%;
  134. height: 100%;
  135. border-radius: 100%;
  136. }
  137. }
  138. .list_tpl{
  139. width: 85%;
  140. .title {
  141. font-size: $font-lg;
  142. color: $font-color-base;
  143. overflow:hidden; //超出的文本隐藏
  144. text-overflow:ellipsis; //溢出用省略号显示
  145. white-space:nowrap;
  146. justify-content: flex-start;
  147. image {
  148. margin-left: 9rpx;
  149. width: 147rpx;
  150. height: 32rpx;
  151. }
  152. }
  153. .time {
  154. margin-top: 15rpx;
  155. font-size: 22rpx;
  156. color: $font-color-light;
  157. }
  158. }
  159. }
  160. .money {
  161. color: #DB1935;
  162. font-size: $font-lg;
  163. }
  164. }
  165. </style>