team.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="content">
  3. <view class="status_bar"><!-- 这里是状态栏 --></view>
  4. <view class="" style="height: 20rpx;"></view>
  5. <view class="user-top flex">
  6. id: {{ userInfo.uid }}
  7. <text style="margin-left: 20rpx;" class="clamp">昵称:{{ userInfo.nickname }}</text>
  8. </view>
  9. <view class="yeji-wraper flex">
  10. <view class="yeji-item">
  11. <view class="yeji-val">{{ group_num || '0' }}</view>
  12. <view class="yeji-name">团队总人数</view>
  13. </view>
  14. <view class="yeji-item">
  15. <view class="yeji-val">{{ group_price || '0' }}</view>
  16. <view class="yeji-name">总销售额</view>
  17. </view>
  18. <view class="yeji-item">
  19. <view class="yeji-val">{{ group_award || '0' }}</view>
  20. <view class="yeji-name">团队奖</view>
  21. </view>
  22. </view>
  23. <!-- <view class="nav-wraper flex">
  24. <view class="nav-item" v-for="(nitem, nindex) in navList" :class="{ action: nindex == tabCurrentIndex }" @click="navClick(nindex)">{{ nitem.text }}</view>
  25. </view> -->
  26. <template v-if="tabCurrentIndex == 0">
  27. <view class="wlg-sb flex" style="margin-top: 40rpx;" @click="navto('/pages/user/teamList?type=0')">
  28. <view class="">直推列表</view>
  29. <view class="">></view>
  30. </view>
  31. <view class="wlg-sb flex" @click="navto('/pages/user/teamList?type=1')">
  32. <view class="">间推列表</view>
  33. <view class="">></view>
  34. </view>
  35. </template>
  36. </view>
  37. </template>
  38. <script>
  39. import { myspread } from '@/api/user.js';
  40. import { mapState, mapMutations } from 'vuex';
  41. export default {
  42. data() {
  43. return {
  44. // 头部图高度
  45. maxheight: '',
  46. tabCurrentIndex: 0,
  47. group_num: '',
  48. group_price: '',
  49. group_award: '',
  50. direct_push_count: '', //直推人数
  51. between_count: '', //间推人数
  52. list: ''
  53. };
  54. },
  55. computed: {
  56. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
  57. getPhone() {
  58. let reg = /(\d{3})\d{4}(\d{4})/;
  59. this.navList.user_list.forEach(e => {
  60. return e.phone.replace(reg, '$1****$2');
  61. console.log(e.phone.replace(reg, '$1****$2'));
  62. });
  63. }
  64. },
  65. onLoad(options) {},
  66. onShow() {
  67. this.loadData();
  68. },
  69. methods: {
  70. ...mapMutations(['setSbList']),
  71. navClick(index) {
  72. this.tabCurrentIndex = index;
  73. },
  74. // 页面跳转
  75. navto(e) {
  76. uni.navigateTo({
  77. url: e
  78. });
  79. },
  80. //获取收入支出信息
  81. async loadData(source) {
  82. let obj = this;
  83. myspread().then(res => {
  84. console.log(res, 'data');
  85. this.group_num = res.data.group_num;
  86. this.group_price = res.data.group_sells;
  87. this.group_award = res.data.group_vip_award;
  88. });
  89. },
  90. // 点击返回 我的页面
  91. toBack() {
  92. uni.switchTab({
  93. url: '/pages/user/user'
  94. });
  95. }
  96. }
  97. };
  98. </script>
  99. <style lang="scss">
  100. page,
  101. .content {
  102. background: #111111;
  103. min-height: 100%;
  104. height: auto;
  105. }
  106. .status_bar {
  107. height: var(--status-bar-height);
  108. width: 100%;
  109. }
  110. .user-top {
  111. color: #fff;
  112. width: 680rpx;
  113. height: 80rpx;
  114. line-height: 80rpx;
  115. box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.2);
  116. margin: 20rpx auto;
  117. border-radius: 8rpx;
  118. padding: 0 30rpx;
  119. font-size: 32rpx;
  120. justify-content: flex-start;
  121. }
  122. .yeji-wraper {
  123. width: 590rpx;
  124. height: 134rpx;
  125. box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.2);
  126. margin: 20rpx auto;
  127. border-radius: 10rpx;
  128. text-align: center;
  129. font-size: 28rpx;
  130. color: #fff;
  131. .yeji-item {
  132. width: 33%;
  133. .yeji-val {
  134. padding-bottom: 20rpx;
  135. font-weight: bold;
  136. }
  137. }
  138. }
  139. .nav-wraper {
  140. width: 630rpx;
  141. height: 80rpx;
  142. box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.2);
  143. margin: auto;
  144. border-radius: 15rpx;
  145. .nav-item {
  146. width: 50%;
  147. text-align: center;
  148. height: 80rpx;
  149. line-height: 80rpx;
  150. }
  151. .action {
  152. background-color: #2b2d54;
  153. border-radius: 20rpx;
  154. color: #fff;
  155. font-weight: bold;
  156. }
  157. }
  158. .wlg-sb {
  159. color: #fff;
  160. width: 590rpx;
  161. height: 140rpx;
  162. border: 1px solid #fff;
  163. margin: 20rpx auto;
  164. border-radius: 10rpx;
  165. padding: 20rpx;
  166. }
  167. </style>