myTeam.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <view class="container">
  3. <view class="list-box flex">
  4. <view class="list-tpl">
  5. <view class="num">{{data.recommend_num || 0}}</view>
  6. <view class="name">你的矿工数</view>
  7. </view>
  8. <view class="list-tpl" @click="nav('/pages/finance/allMiner')">
  9. <view class="num">{{data.group_num || 0}}</view>
  10. <view class="name">总矿工数</view>
  11. </view>
  12. <!-- <view class="list-title">我的团队</view> -->
  13. </view>
  14. <view class="info-box">
  15. <view class="info-name flex">
  16. <view class="info-cell">
  17. <view class="cell">{{data.recommend_achievement || 0}}T</view>
  18. <view class="cell-title">分享业绩</view>
  19. </view>
  20. <view class="info-cell">
  21. <view class="cell">{{data.group_achievenent || 0}}T</view>
  22. <view class="cell-title">我的业绩</view>
  23. </view>
  24. <view class="info-cell">
  25. <view class="cell">{{data.today_achievement || 0}}T</view>
  26. <view class="cell-title">今日新增业绩</view>
  27. </view>
  28. </view>
  29. <view class="list-cell" v-if="list.length > 0">
  30. <view class="cell-name flex">
  31. <view class="title">成员信息</view>
  32. <view class="title-box flex">
  33. <view class="title">等待算力</view>
  34. <view class="title">算力</view>
  35. <view class="title">等级</view>
  36. </view>
  37. </view>
  38. <view class="cell-box flex" v-for="(ls,index) in list" :key='index'>
  39. <view class="cell-tit flex_item">
  40. <image :src="ls.avatar"></image>
  41. <view class="tit-box">
  42. <view class="tit-tpl clamp">{{ls.nickname}}</view>
  43. <view class="tit-tip">{{ls.phone}}</view>
  44. </view>
  45. </view>
  46. <view class="flex num-box">
  47. <view class="num clamp">{{ls.wait_mining}}T</view>
  48. <view class="num clamp">{{ls.mining}}T</view>
  49. <view class="level">V{{ls.level}}</view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="empty-box" v-show="list.length === 0"><empty></empty></view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. import { spread } from '@/api/finance.js';
  59. import empty from '@/components/empty';
  60. export default {
  61. components: {
  62. empty
  63. },
  64. data() {
  65. return {
  66. data:'',
  67. list:'',
  68. };
  69. },
  70. onLoad(option){
  71. this.loadData();
  72. },
  73. onShow() {
  74. },
  75. methods: {
  76. // 请求载入数据
  77. async loadData() {
  78. let obj = this;
  79. spread({}).then(({ data }) => {
  80. obj.data = data;
  81. obj.list = data.list;
  82. console.log(obj.list)
  83. });
  84. },
  85. nav(url){
  86. uni.navigateTo({
  87. url:url
  88. })
  89. }
  90. }
  91. };
  92. </script>
  93. <style lang="scss">
  94. page {
  95. min-height: 100%;
  96. background-color: #ffffff;
  97. .container {
  98. width: 100%;
  99. }
  100. }
  101. .list-box{
  102. width: 100%;
  103. padding: 50rpx 41rpx;
  104. padding-top: 80rpx !important;
  105. background-color: #5771DF;
  106. position: relative;
  107. .list-title{
  108. position: absolute;
  109. top: 80rpx;
  110. color: #FFFFFF;
  111. left: 40%;
  112. font-size: 36rpx;
  113. }
  114. .list-tpl{
  115. background-color: #FFFFFF;
  116. width: 314rpx;
  117. height: 168rpx;
  118. text-align: center;
  119. padding-top:40rpx;
  120. border-radius: 15rpx;
  121. .num{
  122. font-size: 36rpx;
  123. font-weight: bold;
  124. color: #333333;
  125. padding-bottom: 15rpx;
  126. }
  127. .name{
  128. font-size: 26rpx;
  129. font-weight: 500;
  130. color: #999999;
  131. }
  132. }
  133. }
  134. .info-box{
  135. // padding: 25rpx 25rpx;
  136. .info-name{
  137. padding: 40rpx 0rpx;
  138. .info-cell{
  139. width: 33.33%;
  140. text-align: center;
  141. .cell{
  142. font-size: 38rpx;
  143. font-weight: bold;
  144. color: #333333;
  145. }
  146. .cell-title{
  147. font-size: 26rpx;
  148. font-weight: 500;
  149. color: #999999;
  150. padding-top: 20rpx;
  151. }
  152. }
  153. }
  154. .list-cell{
  155. padding: 40rpx 25rpx;
  156. .cell-name{
  157. padding:50rpx 50rpx;
  158. .title-box{
  159. width: 60%;
  160. }
  161. }
  162. .cell-box{
  163. margin-bottom: 94rpx;
  164. .cell-tit{
  165. width: 40%;
  166. image{
  167. width: 80rpx;
  168. height: 80rpx;
  169. border-radius: 100%;
  170. }
  171. .tit-box{
  172. padding-left: 15rpx;
  173. width: 70%;
  174. .tit-tpl{
  175. font-size: 30rpx;
  176. font-weight: 500;
  177. color: #333333;
  178. }
  179. .tit-tip{
  180. font-size: 24rpx;
  181. font-weight: 500;
  182. color: #999999;
  183. padding-top: 20rpx;
  184. }
  185. }
  186. }
  187. .num-box{
  188. width: 60%;
  189. .num{
  190. width: 33.33%;
  191. text-align: center;
  192. }
  193. .level{
  194. background-color: #FED82F;
  195. border-radius: 25rpx;
  196. padding: 8rpx 50rpx;
  197. font-size: 26rpx;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. .empty-box{
  204. margin-top: 60rpx;
  205. width: 100%;
  206. height: 500rpx;
  207. }
  208. </style>