myTeam.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="myTeam">
  3. <view class="card">
  4. <view class="left">
  5. <view class="number"> {{userInfo.rebate_total}} </view>
  6. <view class="label"> 我的业绩 </view>
  7. </view>
  8. <view class="middle">
  9. <u--image width="110rpx" height="110rpx" src="/static/myTeam.png" :fade="true"></u--image>
  10. </view>
  11. <view class="right">
  12. <view class="number"> {{userInfo.user_num}} </view>
  13. <view class="label"> 我的推荐 </view>
  14. </view>
  15. </view>
  16. <view class="list">
  17. <view class="item" v-for="item in list" :key="item.id">
  18. <view class="left">
  19. <view class="avatar-wrap">
  20. <u--image width="102rpx" height="102rpx" radius="100%" shape="circle" bgColor="#d3c6b5"
  21. customStyle="border-radius:100%;" :src="item.headimg" :fade="true" duration="450">
  22. </u--image>
  23. </view>
  24. <view class="info">
  25. <view class="time">
  26. {{ item.created_at }}
  27. </view>
  28. <view class="name">{{ item.nickname }}</view>
  29. </view>
  30. </view>
  31. <view class="right">
  32. <text>订单金额:</text>
  33. <text class="amount">{{ item.order_amount_total }}</text>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import { getMyInviteFriend } from "@/common/api/common";
  41. export default {
  42. data() {
  43. return {
  44. list: [],
  45. userInfo: {}
  46. };
  47. },
  48. onShow() {
  49. this.userInfo = JSON.parse(uni.getStorageSync("userInfo"));
  50. console.log(222, this.userInfo)
  51. },
  52. mounted() {
  53. this._getMyInviteFriend();
  54. },
  55. methods: {
  56. _getMyInviteFriend() {
  57. getMyInviteFriend({
  58. page: 1,
  59. pageSize: 100,
  60. }).then(({ data = {} }) => {
  61. console.log("data=>", data);
  62. this.list = data.list;
  63. // this.staticsData =
  64. });
  65. },
  66. },
  67. };
  68. </script>
  69. <style lang="scss" scoped>
  70. .myTeam {
  71. padding: 20rpx 20rpx 40rpx;
  72. background: #f5f6f8;
  73. .card {
  74. display: flex;
  75. justify-content: center;
  76. align-items: center;
  77. height: 209rpx;
  78. background: linear-gradient(180deg, #f3af00 0%, #f39800 100%);
  79. border-radius: 10rpx 10rpx 10rpx 10rpx;
  80. color: #fff;
  81. .number {
  82. font-size: 46rpx;
  83. font-weight: bold;
  84. color: #ffffff;
  85. line-height: 64rpx;
  86. text-align: center;
  87. }
  88. .label {
  89. font-size: 28rpx;
  90. font-weight: 500;
  91. color: #ffffff;
  92. line-height: 39rpx;
  93. margin-top: 14px;
  94. text-align: center;
  95. }
  96. .middle {
  97. margin: 0 68rpx;
  98. }
  99. }
  100. .item {
  101. height: 154rpx;
  102. background: #ffffff;
  103. border-radius: 10rpx;
  104. margin-top: 20rpx;
  105. padding: 0 33rpx 0 30rpx;
  106. display: flex;
  107. justify-content: space-between;
  108. align-items: center;
  109. .left {
  110. display: flex;
  111. align-items: center;
  112. .info {
  113. margin-left: 20rpx;
  114. }
  115. .time {
  116. font-size: 28rpx;
  117. font-weight: 500;
  118. color: #807f85;
  119. line-height: 39rpx;
  120. }
  121. .name {
  122. font-size: 28rpx;
  123. font-weight: bold;
  124. color: #1d161f;
  125. line-height: 39rpx;
  126. margin-top: 19rpx;
  127. }
  128. }
  129. .right {
  130. font-size: 28rpx;
  131. font-weight: 500;
  132. color: #807f85;
  133. line-height: 39rpx;
  134. .amount {
  135. font-size: 32rpx;
  136. font-weight: bold;
  137. color: #c9161e;
  138. line-height: 39rpx;
  139. }
  140. }
  141. }
  142. }
  143. </style>