partner.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="container">
  3. <view class="partner">
  4. <image class="top-bg" src="/static/image/distribution-top-bg.png"></image>
  5. <view class="userInfo">
  6. <view class="u-plr30">
  7. <view class="head u-flex-sb">
  8. <view class="u-flex">
  9. <image v-if="accountInfo.headPhoto" :src="accountInfo.headPhoto"></image>
  10. <image v-else :src="$defaultAvatar" mode=""></image>
  11. <view class="u-ml30 u-mt10">
  12. <view class="u-font30 u-1A1A1A nickname u-text1">{{
  13. accountInfo.nickname || accountInfo.realName
  14. }}</view>
  15. </view>
  16. </view>
  17. <view class="u-font24 u-999 u-mt10">直接伙伴:<text class="u-FF0000">{{ Total || 0 }}</text>人
  18. </view>
  19. </view>
  20. </view>
  21. <view class="partner-list">
  22. <image class="partner-bg" src="/static/image/partner-bg.png"></image>
  23. <view class="position-ab">
  24. <view v-if="RowsList.length > 0">
  25. <view class="item u-plr30" v-for="(item, index) in RowsList" :key="item.id">
  26. <view class="u-flex u-border-one-one pd44">
  27. <image class="u-avatar106" v-if="item.headPhoto" :src="item.headPhoto"></image>
  28. <image class="u-avatar106" v-else :src="$defaultAvatar"></image>
  29. <view class="u-font24 u-999">
  30. <view class="u-font28 u-1A1A1A ht36 u-text-width">{{
  31. item.nickname
  32. }}</view>
  33. <view>
  34. <rich-text :nodes="'*******' + $mUtil.cutOut(item.mobile)"></rich-text>
  35. </view>
  36. <view>绑定时间:{{ item.createTime }}</view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="nogoods u-mt30 u-flex-column-center" v-if="RowsList.length == 0">
  42. <noData :config="{ top: 5, content: '暂无数据~' }"></noData>
  43. <loadMore v-if="RowsList.length > 0" :status="LoadStatus"></loadMore>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script setup>
  52. import { ref } from "vue";
  53. import { onLoad } from "@dcloudio/uni-app";
  54. import { userInfo } from "@/api/login.js";
  55. import { partnerPage_Api } from "@/api/userInfo.js";
  56. import { usePageData } from "@/hooks/usePageData"
  57. const { RowsList, LoadStatus, initData, Total } = usePageData(partnerPage_Api);
  58. const accountInfo = ref({});
  59. const getUserInfo = () => {
  60. userInfo().then((res) => {
  61. if (res && res.code == 200) {
  62. accountInfo.value = res.data;
  63. }
  64. });
  65. }
  66. onLoad(() => {
  67. //获取用户信息
  68. getUserInfo();
  69. initData();
  70. });
  71. </script>
  72. <style lang="scss">
  73. .nickname {
  74. width: 300rpx;
  75. }
  76. .u-flex-sb {
  77. display: flex;
  78. justify-content: space-between;
  79. }
  80. .ht36 {
  81. height: 36rpx;
  82. line-height: 36rpx;
  83. }
  84. .partner {
  85. position: relative;
  86. .top-bg {
  87. width: 100%;
  88. height: 238rpx;
  89. }
  90. .userInfo {
  91. position: absolute;
  92. top: 68rpx;
  93. width: 100%;
  94. .head {
  95. background-color: #fffaee;
  96. padding: 40rpx 30rpx 36rpx;
  97. border-radius: 20rpx;
  98. z-index: -1;
  99. image {
  100. width: 106rpx;
  101. height: 106rpx;
  102. border: 4rpx solid #ffffff;
  103. border-radius: 50%;
  104. }
  105. }
  106. }
  107. .partner-list {
  108. margin-top: -48rpx;
  109. position: relative;
  110. .partner-bg {
  111. height: 70vh;
  112. width: 100%;
  113. }
  114. .position-ab {
  115. position: absolute;
  116. top: 50rpx;
  117. width: 100%;
  118. }
  119. .pd44 {
  120. padding: 44rpx 0rpx;
  121. }
  122. }
  123. }
  124. </style>