team.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="content">
  3. <!-- <view class="userHead dfsb">
  4. <view class="uHeader dffd">
  5. <text class="uinfoPho">直推人数</text>
  6. <text>{{ teamNum.parent_num || 0 }}</text>
  7. </view>
  8. <view class="uHeader dffd">
  9. <text class="uinfoPho">团队人数</text>
  10. <text>{{ teamNum.team_num || 0 }}</text>
  11. </view>
  12. </view>
  13. <view class="teamTab dfsa">
  14. <text @tap="change(1)" :class="tabsel == 1 ? 'tabli' : ''">直推</text>
  15. <text @tap="change(2)" :class="tabsel == 2 ? 'tabli' : ''">团队</text>
  16. </view> -->
  17. <view class="userCenter">
  18. <view class="order">
  19. <view v-for="(item, ind) in teamList" :key="ind" class="ordtype dfsb">
  20. <image :src=" item.avatar" />
  21. <view class="dffd">
  22. <text class="name">
  23. {{ item.nickname }}
  24. <text class="textgrey">{{ item.phone }}</text>
  25. </text>
  26. <view class="bot dfsb">
  27. <text class="time">{{ item.create_time }}</text>
  28. </view>
  29. </view>
  30. <!-- <text>{{item.level}}</text> -->
  31. </view>
  32. <view v-if="teamList.length < 1" class="moredata"><u-empty text="还没有队友哦" mode="list"></u-empty></view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. tabsel: 1,
  42. status: 'loadmore',
  43. teamNum: {},
  44. teamList: [
  45. // {
  46. // username: '好设计师',
  47. // create_time: '2020-09-18',
  48. // level: 1
  49. // }
  50. ],
  51. page: 1,
  52. pagenum: 10
  53. };
  54. },
  55. onLoad() {
  56. this.onload();
  57. },
  58. onReachBottom() {
  59. if (this.status == 'nomore') return;
  60. this.status = 'loading';
  61. this.page = ++this.page;
  62. this.onload();
  63. },
  64. methods: {
  65. onload() {
  66. this.$api
  67. .request('user/getTeamList', {
  68. page: this.page,
  69. limit: this.pagenum
  70. })
  71. .then(data => {
  72. if (data.code == 200) {
  73. this.teamList = data.data;
  74. this.status = 'loadmore';
  75. if (data.data.length < this.pagenum) {
  76. this.status = 'nomore';
  77. }
  78. } else {
  79. this.$api.toast(data.msg);
  80. setTimeout(res => {
  81. uni.navigateBack({
  82. delta: 1
  83. });
  84. }, 1000);
  85. }
  86. })
  87. }
  88. }
  89. };
  90. </script>
  91. <style lang="scss">
  92. .content {
  93. min-height: 100vh;
  94. background-color: #f5f5f5;
  95. .teamTab {
  96. background-color: #fff;
  97. justify-content: center;
  98. margin-top: 20rpx;
  99. padding: 32rpx 20rpx 0;
  100. text {
  101. margin: 0 40rpx;
  102. font-size: 36rpx;
  103. color: #666666;
  104. }
  105. .tabli {
  106. width: 96rpx;
  107. text-align: center;
  108. height: 48rpx;
  109. line-height: 48rpx;
  110. border-radius: 30rpx;
  111. border: 1px solid #ae7a58;
  112. color: #ae7a58;
  113. font-size: 28rpx;
  114. }
  115. }
  116. .userCenter {
  117. // margin-top: 20rpx;
  118. .order {
  119. background-color: #fff;
  120. .ordtype {
  121. padding: 30rpx;
  122. border-bottom: 1px solid #f7f7f7;
  123. &:nth-last-of-type(1) {
  124. border-bottom: 0;
  125. }
  126. image {
  127. width: 80rpx;
  128. height: 80rpx;
  129. border-radius: 50%;
  130. }
  131. .dffd {
  132. margin: 0 20rpx;
  133. flex: 1;
  134. .name {
  135. font-size: 34rpx;
  136. font-family: PingFangSC-Semibold, PingFang SC;
  137. font-weight: 600;
  138. color: rgba(51, 51, 51, 1);
  139. line-height: 50rpx;
  140. margin-bottom: 5rpx;
  141. .fontbase {
  142. margin-left: 15rpx;
  143. font-size: 30rpx;
  144. color: #999;
  145. }
  146. }
  147. }
  148. .bot {
  149. width: 100%;
  150. }
  151. .time {
  152. color: #999;
  153. line-height: 30rpx;
  154. }
  155. }
  156. }
  157. }
  158. }
  159. </style>