browse.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <view>
  3. <view class="CommissionRank">
  4. <view class="wrapper">
  5. <view class="list">
  6. <view class="item acea-row row-between-wrapper" v-for="(item,index) in rankList" :key="index">
  7. <view class="num" v-if="index <3">
  8. <image :src="'https://hy.liuniu946.com/app/img/'+(index+1)+'.png'"></image>
  9. </view>
  10. <view class="num" v-else>
  11. {{index+1}}
  12. </view>
  13. <view class="picTxt acea-row row-between-wrapper">
  14. <view class="pictrue"><image :src="item.avatar ? item.avatar : '/static/images/f.png'"></image></view>
  15. <view class="text line1">{{item.nickname}}</view>
  16. </view>
  17. <view class="people font-color">¥{{item.brokerage_price}}</view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <!-- #ifdef MP -->
  23. <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
  24. <!-- #endif -->
  25. </view>
  26. </template>
  27. <script>
  28. import {getbrowse, getBrokerageRank } from '@/api/user.js';
  29. import {
  30. toLogin
  31. } from '@/libs/login.js';
  32. import {
  33. mapGetters
  34. } from "vuex";
  35. export default {
  36. components: {
  37. },
  38. data() {
  39. return {
  40. active: 0,
  41. rankList:[],
  42. page:1,
  43. limit:20,
  44. loadend:false,
  45. loading:false,
  46. loadTitle:'加载更多',
  47. type:'week',
  48. position:0,
  49. };
  50. },
  51. onLoad(){
  52. this.getBrokerageRankList()
  53. },
  54. methods: {
  55. onLoadFun:function(){
  56. this.isShowAuth = false;
  57. this.getBrokerageRankList();
  58. },
  59. getBrokerageRankList:function(){
  60. if(this.loadend) return;
  61. if(this.loading) return;
  62. this.loading = true;
  63. this.loadTitle = '';
  64. getbrowse({
  65. page:this.page,
  66. limit:this.limit,
  67. }).then(res=>{
  68. let list = res.data.rank;
  69. let loadend = list.length < this.limit;
  70. this.rankList.push.apply(this.data);
  71. this.loading = false;
  72. this.loadend = loadend;
  73. this.loadTitle = loadend ? '😕我也是有底线的':'加载更多';
  74. this.$set(this,'rankList',this.rankList);
  75. this.position = res.data.position;
  76. }).catch(err=>{
  77. this.loading = false;
  78. this.loadTitle = '加载更多';
  79. })
  80. }
  81. },
  82. onReachBottom: function () {
  83. this.page= this.page+1
  84. this.getBrokerageRankList();
  85. }
  86. }
  87. </script>
  88. <style scoped lang="scss">
  89. .rank{
  90. color: #e93323 !important;
  91. }
  92. .nav{
  93. display: flex;
  94. }
  95. .nav view{
  96. text-align: center;
  97. flex: 1;
  98. }
  99. .header{
  100. border-bottom-left-radius: 20rpx;
  101. border-bottom-right-radius: 20rpx;
  102. }
  103. .CommissionRank .header{
  104. background-image: url(https://hy.liuniu946.com/app/img/phb.jpg);
  105. background-repeat: no-repeat;
  106. width: 100%;height: 344rpx;background-size: 100% 100%;
  107. }
  108. .CommissionRank .header .rank {font-size: 33rpx;color: #fff;position: absolute;top: 160rpx;left: 48rpx;}
  109. .CommissionRank .header .rank .num {font-size: 51rpx;font-weight: bold;margin: 0 10rpx;}
  110. .CommissionRank .wrapper {width: 710rpx;background-color: #fff;border-radius: 20rpx;margin: -76rpx auto 0 auto;}
  111. .CommissionRank .wrapper .nav {height: 99rpx;border-bottom: 2.5rpx solid #f3f3f3;font-size: 30rpx;font-weight: bold;color: #999;line-height: 99rpx;}
  112. .CommissionRank .wrapper .nav .item.font-color {border-bottom: 4rpx solid #e93323;}
  113. .CommissionRank .wrapper .list {padding: 0 30rpx;}
  114. .CommissionRank .wrapper .list .item {border-bottom: 1px solid #f3f3f3;height: 101rpx;font-size: 28rpx;}
  115. .CommissionRank .wrapper .list .item .num {color: #666;width: 70rpx;}
  116. .CommissionRank .wrapper .list .item .num image {width: 34rpx;height: 40rpx;display: block;}
  117. .CommissionRank .wrapper .list .item .picTxt {width: 350rpx;}
  118. .CommissionRank .wrapper .list .item .picTxt .pictrue {width: 68rpx;height: 68rpx;}
  119. .CommissionRank .wrapper .list .item .picTxt .pictrue image {width: 100%;height: 100%;display: block;border-radius: 50%;}
  120. .CommissionRank .wrapper .list .item .picTxt .text {width: 262rpx;color: #333;}
  121. .CommissionRank .wrapper .list .item .people {width: 175rpx;text-align: right;}
  122. </style>