team.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="share-team">
  3. <view class="title">
  4. <text>一级分享名称(1)</text>
  5. </view>
  6. <view
  7. v-for="(item,index) in data"
  8. :key="index"
  9. class="child-info"
  10. >
  11. <view class="head-box main-between cross-center">
  12. <view class="base-info dir-left-nowrap">
  13. <view class="head-img">
  14. <image :src="item.avatar" />
  15. </view>
  16. <view class="nickname-box dir-top-wrap main-center">
  17. <view class="nickname">
  18. {{ item.nickname }}
  19. </view>
  20. <view class="bind-at">
  21. 绑定时间:{{ item.become_child_at }}
  22. </view>
  23. </view>
  24. </view>
  25. <view class="child-num">
  26. 推广{{ item.child_count }}人
  27. </view>
  28. </view>
  29. <view class="price-box main-between cross-center">
  30. <view>{{ item.child_order_sum_income }}元</view>
  31. <view>{{ item.child_order_count }}个订单</view>
  32. </view>
  33. </view>
  34. </view></template>
  35. <script>
  36. export default {
  37. name: 'ShareTeam',
  38. data() {
  39. return {
  40. limit: 10,
  41. page: 1,
  42. isMore: true,
  43. data: []
  44. }
  45. },
  46. computed: {},
  47. methods: {
  48. getTeam() {
  49. this.$loading()
  50. this.$api.share.team.lists({ limit: this.limit, page: this.page }).then(res => {
  51. this.$hideLoading()
  52. if (res.data.length) {
  53. this.data = this.data.concat(res.data)
  54. } else {
  55. this.isMore = false
  56. }
  57. })
  58. }
  59. },
  60. onLoad() {
  61. this.getTeam()
  62. },
  63. onReachBottom(e) {
  64. if (!this.isMore) return
  65. this.page += 1
  66. this.getTeam()
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .share-team {
  72. padding: 20rpx 30rpx 80rpx;
  73. font-size: 28rpx;
  74. .title{
  75. text-align: center;
  76. color: #6eebe8;
  77. margin-bottom: 30rpx;
  78. text{
  79. padding-bottom: 10rpx;
  80. border-bottom: 4rpx solid #6eebe8;
  81. }
  82. }
  83. .child-info{
  84. background: #1C203B;
  85. color: #ffffff;
  86. padding: 30rpx 0;
  87. border-radius: 20rpx;
  88. margin-bottom: 30px;
  89. .head-box{
  90. padding: 0 30rpx 30rpx;
  91. border-bottom: 1rpx #232849 solid;
  92. .base-info{
  93. .head-img{
  94. width: 80rpx;
  95. height: 80rpx;
  96. border-radius: 50%;
  97. overflow: hidden;
  98. background: #ccc;
  99. image{
  100. width: 100%;
  101. height: 100%;
  102. }
  103. }
  104. .nickname-box{
  105. margin-left: 10rpx;
  106. .nickname{
  107. font-size: 30rpx;
  108. margin-bottom: 4rpx;
  109. }
  110. .bind-at{
  111. font-size: 24rpx;
  112. }
  113. }
  114. }
  115. .child-num{
  116. color: #6eebe8;
  117. font-size: 32rpx;
  118. margin-top: -20rpx;
  119. }
  120. }
  121. .price-box{
  122. padding: 30rpx 30rpx 0;
  123. }
  124. }
  125. }
  126. </style>