user.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view>
  3. <scroll-view scroll-y="true" class="scroll-content" :enhanced="true" :bounces="false" :show-scrollbar="false" @scroll="pageScroll">
  4. <view class="user-header">
  5. <view class="header-bg">
  6. <image src="https://blue-data.oss-cn-guangzhou.aliyuncs.com/star/hero-grid.png" mode="widthFix"></image>
  7. </view>
  8. <cu-custom :bgColor="scrollHeight>20?'bg-bluev-head':'none'">
  9. <block slot="content">我的</block>
  10. </cu-custom>
  11. <view class="user-detail-body">
  12. <view class="avatar"><image src="/static/rank/avatar.jpeg" mode="widthFix"></image></view>
  13. <view class="detail-info">
  14. <view class="name">我是庄小周</view>
  15. <view class="desc">ID:234234234 <text class="cuIcon-copy"></text></view>
  16. </view>
  17. <view class="detail-status">
  18. <!-- <view class="status-btn full"><text class="cuIcon-edit"></text>已签约</view> -->
  19. <view class="status-btn"><text class="cuIcon-edit"></text>未签约</view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="user-body">
  24. <view class="user-total">
  25. <view class="total-item">
  26. <view class="num">102</view>
  27. <view class="name">完成任务</view>
  28. </view>
  29. <view class="total-item">
  30. <view class="num">102</view>
  31. <view class="name">收益(元)</view>
  32. </view>
  33. <view class="total-item">
  34. <view class="num">102</view>
  35. <view class="name">粉丝</view>
  36. </view>
  37. <view class="total-item">
  38. <view class="num">10<text>%</text></view>
  39. <view class="name">平均转化率</view>
  40. </view>
  41. </view>
  42. <view class="user-level">
  43. <view class="user-level-body">
  44. <view class="level-top">
  45. <view class="level-name">LV.3黄金达人</view>
  46. <view class="level-more">查看等级 <text class="cuIcon-right"></text></view>
  47. </view>
  48. <view class="level-mid">距离下一等级还差119</view>
  49. <view class="level-foot">
  50. <view class="level-step">
  51. <view class="success" style="width: 50%;"></view>
  52. </view>
  53. <view class="level-num"><text>181</text>/300</view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="user-menu-service">
  58. <view class=""></view>
  59. </view>
  60. </view>
  61. </scroll-view>
  62. </view>
  63. </template>
  64. <script>
  65. var app;
  66. export default {
  67. data() {
  68. return {
  69. scrollHeight:0,
  70. }
  71. },
  72. onLoad() {
  73. app = this;
  74. },
  75. methods: {
  76. pageScroll(event) {
  77. var scrollHeight = event.detail.scrollTop;
  78. app.scrollHeight = scrollHeight;
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss">
  84. page{background-color: #f8f8f8;}
  85. .user-body .user-level-body .level-foot{display: flex;align-items: center;justify-content: space-between;gap: 20rpx;}
  86. .user-body .user-level-body .level-foot .level-step{background-color: #E4E4E4;height: 10rpx;flex: 1;border-radius: 10rpx;}
  87. .user-body .user-level-body .level-foot .level-step .success{background-color: #87E0FF;height: 10rpx;border-radius: 10rpx;}
  88. .user-body .user-level-body .level-foot .level-num{color: #999;font-size: 22rpx;}
  89. .user-body .user-level-body .level-foot .level-num text{color: #666;}
  90. .user-body .user-level-body .level-mid{margin: 10rpx 0;font-size: 22rpx;color: #8C8C8C;}
  91. .user-body .user-level-body .level-top{display: flex;align-items: center;justify-content: space-between;}
  92. .user-body .user-level-body .level-top .level-name{color: #000;font-weight: 800;font-family: "bluevBold";font-size: 30rpx;}
  93. .user-body .user-level-body .level-top .level-more{color: #666;font-size: 22rpx;}
  94. .user-header{position: relative;background: linear-gradient(180deg, #87e0ff 10%, #CFEEF858 55%, #f8f8f8 100%);}
  95. .user-header .header-bg{position: absolute;top: 0;left: 0;right: 0;z-index: 9998;}
  96. .user-header .header-bg image{width: 100%;}
  97. .user-detail-body{margin: 20rpx;display: flex;align-items: center;position: relative;z-index: 9999;}
  98. .user-detail-body .avatar image{width: 100rpx;height: 100rpx;border-radius: 100%;}
  99. .user-detail-body .detail-info{margin-left: 20rpx;}
  100. .user-detail-body .detail-info .name{font-family: "bluevBold";color: #000;font-weight: 800;font-size: 28rpx;}
  101. .user-detail-body .detail-info .desc{color: #666;font-size: 22rpx;margin-top: 10rpx;}
  102. .user-detail-body .detail-status{margin-left: auto;margin-right: 0;}
  103. .user-detail-body .detail-status .status-btn {font-size: 24rpx;padding: 10rpx 15rpx;border-radius: 40rpx;display: flex;align-items: center;gap: 10rpx;color: #7F8185;background-color: transparent;}
  104. .user-detail-body .detail-status .status-btn.full{background-color: #03BEFF;color: #fff;}
  105. .user-body{margin: 20rpx;}
  106. .user-body .user-total{display: flex;align-items: flex-start;justify-content: space-between;width: 100%;flex-direction: row;}
  107. .user-body .user-total .total-item{min-width: 0%;display: flex;flex-direction: column;align-items: center;justify-content: center;}
  108. .user-body .user-total .total-item .num{color: #212226;font-size: 36rpx;font-weight: 800;line-height: 1.1;text-align: center;}
  109. .user-body .user-total .total-item .name{color: rgba(21, 21, 21, 0.45);font-size: 22rpx;line-height: 1.2;text-align: center;margin-top: 10rpx;}
  110. .user-body .user-level{background: linear-gradient(0deg, #f0fbff 0%, #b0e9ff 100%);padding: 2rpx;box-sizing: border-box;border-radius: 24rpx;margin: 20rpx 0;}
  111. .user-body .user-level-body{padding: 28rpx 28rpx 32rpx;border-radius: 22rpx;background: linear-gradient(180deg, #def6ff 0%, #eefaff 52%, #ffffff 100%);box-sizing: border-box;}
  112. </style>