tabulation.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="all">
  3. <view class="row flex">
  4. <view class="rowItem">
  5. <view class="shu">{{total || 0}}</view>
  6. <view class="wenben">{{$t('huiyuan.a1')}}</view>
  7. </view>
  8. <view class="rowItem">
  9. <view class="shu">{{group_num || 0}}</view>
  10. <view class="wenben">{{$t('huiyuan.a2')}}</view>
  11. </view>
  12. </view>
  13. <view class="row flex margin-t-20">
  14. <view class="rowItem">
  15. <view class="shu">{{totalLevel || 0}}</view>
  16. <view class="wenben">{{$t('huiyuan.a3')}}</view>
  17. </view>
  18. <view class="rowItem">
  19. <view class="shu">{{valid_user || 0}}</view>
  20. <view class="wenben">{{$t('huiyuan.a4')}}</view>
  21. </view>
  22. </view>
  23. <view class="list margin-t-20 margin-c-30" v-for="(item, ind) in list" :key="ind">
  24. <view class="top flex">
  25. <view class="nc clamp">{{item.nickname}}</view>
  26. <image class="img margin-l-20" src="/static/shouye/huiyuan.png" mode=""></image>
  27. </view>
  28. <navigator :url="`/pages/user/vip/details?id=${item.uid}`">
  29. <view class="center padding-v-30 flex" >
  30. <view class="sj">{{item.time}}</view>
  31. <view class="flex-start">
  32. <view class="xq margin-r-10">{{$t('huiyuan.a5')}}</view>
  33. <image class="ima" src="/static/icon/jt.png" mode="scaleToFill"></image>
  34. </view>
  35. </view>
  36. </navigator>
  37. <view class="last flex padding-t-30">
  38. <view>
  39. <text class="left">{{$t('huiyuan.a6')}}:</text>
  40. <text class="leftT">{{item.join_usdt}}</text>
  41. </view>
  42. <view>
  43. <text class="right">{{$t('huiyuan.a7')}}:</text>
  44. <text class="rightT">{{item.childCount}}</text>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="bto">
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import {
  54. mapState,
  55. mapMutations
  56. } from 'vuex';
  57. import {
  58. spread,
  59. getUserInfo
  60. } from "@/api/user.js"
  61. export default {
  62. data() {
  63. return {
  64. page: 1,
  65. limit: 10,
  66. loadingType: 'more',
  67. loaded: false,
  68. list: [],
  69. group_num: '', //团队人数
  70. total: '', // 用户总数
  71. totalLevel: '', // 账户总数
  72. valid_user: '', // 有效账户
  73. };
  74. },
  75. onLoad(option) {
  76. this.spread()
  77. uni.setNavigationBarTitle({
  78. title: this.$t("tab.b1"),
  79. });
  80. },
  81. computed: {
  82. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  83. },
  84. onReachBottom() {
  85. this.spread()
  86. },
  87. methods: {
  88. // 会员记录
  89. spread() {
  90. let that = this
  91. if (that.loadingType == 'loading' || that.loadingType == 'noMore') {
  92. return
  93. }
  94. that.loadingType = "loading";
  95. spread({
  96. page: that.page,
  97. limit: that.limit,
  98. // id: that.userInfo.uid,
  99. }).then(({
  100. data
  101. }) => {
  102. let list = data.list
  103. that.list = that.list.concat(list)
  104. that.group_num = data.group_num
  105. that.total = data.total
  106. that.totalLevel = data.totalLevel
  107. that.valid_user = data.valid_user
  108. if (list.length == that.limit) {
  109. that.loadingType = 'more'
  110. } else {
  111. that.loadingType = 'noMore'
  112. }
  113. that.loaded = true
  114. }).catch(e => {
  115. console.log(e);
  116. })
  117. },
  118. }
  119. };
  120. </script>
  121. <style lang="scss">
  122. .all {
  123. width: 750rpx;
  124. background-color: $page-color-base;
  125. line-height: 1;
  126. }
  127. .row {
  128. padding: 0 30rpx;
  129. .rowItem {
  130. background: #191A1F;
  131. border-radius: 10rpx;
  132. width: 48%;
  133. text-align: center;
  134. padding: 40rpx 0;
  135. .wenben {
  136. font-size: 28rpx;
  137. font-weight: 500;
  138. color: #FFFFFF;
  139. }
  140. .shu {
  141. font-size: 46rpx;
  142. font-weight: bold;
  143. color: #FEB041;
  144. }
  145. }
  146. }
  147. .list {
  148. background: #191A1F;
  149. border-radius: 16rpx;
  150. padding: 30rpx;
  151. .top {
  152. .nc {
  153. font-size: $font-lg;
  154. font-weight: bold;
  155. color: #FFFFFF;
  156. flex-grow: 1;
  157. }
  158. .img {
  159. flex-shrink: 0;
  160. width: 100rpx;
  161. height: 32rpx;
  162. }
  163. }
  164. .center {
  165. border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  166. .ima {
  167. width: 13rpx;
  168. height: 19rpx;
  169. }
  170. }
  171. .center,
  172. .last {
  173. font-weight: 500;
  174. font-size: $font-base;
  175. color: #999999;
  176. }
  177. .last {
  178. .leftT {
  179. color: #b98134;
  180. }
  181. .rightT {
  182. color: #ffffff;
  183. }
  184. }
  185. }
  186. </style>