paiMing.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="志愿排名" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <view class="tit_box">
  5. <view class="pm_tit">排名</view>
  6. <view class="pm_tit">志愿者</view>
  7. <view class="pm_tit">活跃度</view>
  8. <view class="pm_tit">任务达标率</view>
  9. <view class="pm_tit">积分</view>
  10. <view class="pm_tit">详情</view>
  11. </view>
  12. <view class="xx_box">
  13. <scroll-view style="height: 1000rpx" scroll-y="true" @scrolltolower="LoadMoress">
  14. <view class="xx_item" @click="detailsBtn(item.id)" v-for="(item, index) in information" :key="item.id">
  15. <view>
  16. {{ index + 1 }}
  17. </view>
  18. <view style="font-size: 32rpx; width: 106rpx">{{ item.name }}</view>
  19. <view style="width: 60rpx">{{ item.total_checkins }}</view>
  20. <view class="">{{ item.completion_rate }}</view>
  21. <view class="">{{ item.score }}</view>
  22. <view style="width: 75rpx; height: 40rpx; border: 2rpx solid #fabd7c; line-height: 40rpx; text-align: center">详情</view>
  23. </view>
  24. </scroll-view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. let that;
  30. export default {
  31. data() {
  32. return {
  33. page: 1,
  34. isLoading: false,
  35. // 信息列表
  36. information: []
  37. };
  38. },
  39. onLoad() {
  40. that = this;
  41. this.rankingList();
  42. },
  43. methods: {
  44. // 排名
  45. rankingList() {
  46. this.isLoading = true;
  47. this.$api.rankingList({ page: this.page, pageSize: '30', main_body_id: 1 }, function (res) {
  48. that.isLoading = false;
  49. that.information = [...that.information, ...res.data];
  50. });
  51. },
  52. LoadMoress() {
  53. if (this.isLoading) {
  54. return;
  55. } else {
  56. this.page++;
  57. this.rankingList();
  58. }
  59. },
  60. // 详情
  61. detailsBtn(id) {
  62. uni.navigateTo({
  63. url: '/index_fenbao/fuWu/paiMing/paiMingXQ?id=' + id
  64. });
  65. }
  66. }
  67. };
  68. </script>
  69. <style>
  70. .box {
  71. width: 100%;
  72. padding-bottom: 50rpx;
  73. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xy_bgt.png');
  74. background-repeat: repeat-y;
  75. background-attachment: fixed;
  76. background-size: 100% 100%;
  77. min-height: 100%;
  78. height: auto;
  79. /* background-color: #fff9e9; */
  80. }
  81. .tit_box {
  82. display: flex;
  83. align-items: center;
  84. height: 75rpx;
  85. justify-content: space-around;
  86. margin-top: 30rpx;
  87. background: url('/static/img/sj_top_bg.png') no-repeat;
  88. background-size: 100% 100%;
  89. }
  90. .pm_tit {
  91. font-size: 26rpx;
  92. font-weight: 400;
  93. line-height: 40rpx;
  94. }
  95. .xx_box {
  96. padding: 0 10rpx 0 10rpx;
  97. }
  98. .xx_item {
  99. display: flex;
  100. justify-content: space-between;
  101. margin-top: 40rpx;
  102. font-size: 28rpx;
  103. line-height: 44rpx;
  104. }
  105. </style>