team.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="share-team">
  3. <view class="title">
  4. <text>一级分享名称</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. import { mapState } from 'vuex'
  37. export default {
  38. name: 'ShareTeam',
  39. data() {
  40. return {
  41. limit: 10,
  42. page: 1,
  43. isMore: true,
  44. data: []
  45. }
  46. },
  47. computed: {
  48. ...mapState({
  49. userInfo: seate => seate.user.info
  50. })
  51. },
  52. methods: {
  53. getTeam() {
  54. this.$loading()
  55. this.$api.share.team.lists({ limit: this.limit, page: this.page }).then(res => {
  56. this.$hideLoading()
  57. if (res.data.length) {
  58. this.data = this.data.concat(res.data)
  59. } else {
  60. this.isMore = false
  61. }
  62. })
  63. }
  64. },
  65. onLoad() {
  66. this.getTeam()
  67. },
  68. onReachBottom(e) {
  69. if (!this.isMore) return
  70. this.page += 1
  71. this.getTeam()
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .share-team {
  77. padding: 20rpx 30rpx 80rpx;
  78. font-size: 28rpx;
  79. .title{
  80. text-align: center;
  81. color: #6eebe8;
  82. margin-bottom: 30rpx;
  83. text{
  84. padding-bottom: 10rpx;
  85. border-bottom: 4rpx solid #6eebe8;
  86. }
  87. }
  88. .child-info{
  89. background: $bg-op-color;
  90. color: #ffffff;
  91. padding: 30rpx 0;
  92. border-radius: 20rpx;
  93. margin-bottom: 30px;
  94. .head-box{
  95. padding: 0 30rpx 30rpx;
  96. border-bottom: 1rpx $border-op-color solid;
  97. .base-info{
  98. .head-img{
  99. width: 80rpx;
  100. height: 80rpx;
  101. border-radius: 50%;
  102. overflow: hidden;
  103. background: #ccc;
  104. image{
  105. width: 100%;
  106. height: 100%;
  107. }
  108. }
  109. .nickname-box{
  110. margin-left: 10rpx;
  111. .nickname{
  112. font-size: 30rpx;
  113. margin-bottom: 4rpx;
  114. }
  115. .bind-at{
  116. font-size: 24rpx;
  117. }
  118. }
  119. }
  120. .child-num{
  121. color: #6eebe8;
  122. font-size: 32rpx;
  123. margin-top: -20rpx;
  124. }
  125. }
  126. .price-box{
  127. padding: 30rpx 30rpx 0;
  128. }
  129. }
  130. }
  131. </style>