tabulation.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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. // <<<<<<< HEAD
  100. // }).then(res => {
  101. // let data = res.data
  102. // console.log('1111111', data);
  103. // this.group_num = data.group_num
  104. // this.total = data.total
  105. // this.totalLevel = data.totalLevel
  106. // this.valid_user = data.valid_user
  107. // this.list = res.data.list
  108. // console.log('list', this.list);
  109. // }).catch(e=>{
  110. // =======
  111. }).then(({
  112. data
  113. }) => {
  114. let list = data.list
  115. that.list = that.list.concat(list)
  116. that.group_num = data.group_num
  117. that.total = data.total
  118. that.totalLevel = data.totalLevel
  119. that.valid_user = data.valid_user
  120. if (list.length == that.limit) {
  121. that.loadingType = 'more'
  122. } else {
  123. that.loadingType = 'noMore'
  124. }
  125. that.loaded = true
  126. }).catch(e => {
  127. // >>>>>>> ec643268e144bb15fc39a442eec94ca3d04a70ac
  128. console.log(e);
  129. })
  130. },
  131. }
  132. };
  133. </script>
  134. <style lang="scss">
  135. .all {
  136. width: 750rpx;
  137. background-color: $page-color-base;
  138. line-height: 1;
  139. }
  140. .row {
  141. padding: 0 30rpx;
  142. .rowItem {
  143. background: #191A1F;
  144. border-radius: 10rpx;
  145. width: 48%;
  146. text-align: center;
  147. padding: 40rpx 0;
  148. .wenben {
  149. font-size: 28rpx;
  150. font-weight: 500;
  151. color: #FFFFFF;
  152. }
  153. .shu {
  154. font-size: 46rpx;
  155. font-weight: bold;
  156. color: #FEB041;
  157. }
  158. }
  159. }
  160. .list {
  161. background: #191A1F;
  162. border-radius: 16rpx;
  163. padding: 30rpx;
  164. .top {
  165. .nc {
  166. font-size: $font-lg;
  167. font-weight: bold;
  168. color: #FFFFFF;
  169. flex-grow: 1;
  170. }
  171. .img {
  172. flex-shrink: 0;
  173. width: 100rpx;
  174. height: 32rpx;
  175. }
  176. }
  177. .center {
  178. border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  179. .ima {
  180. width: 13rpx;
  181. height: 19rpx;
  182. }
  183. }
  184. .center,
  185. .last {
  186. font-weight: 500;
  187. font-size: $font-base;
  188. color: #999999;
  189. }
  190. .last {
  191. .leftT {
  192. color: #b98134;
  193. }
  194. .rightT {
  195. color: #ffffff;
  196. }
  197. }
  198. }
  199. </style>