my.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="my-box">
  3. <view class="my-top"></view>
  4. <image class="my-avatar"
  5. src="https://images.unsplash.com/photo-1586348943529-beaae6c28db9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wyMDUzMDJ8MHwxfHNlYXJjaHw3fHxOYXR1cmV8ZW58MXx8fHwxNzIxMjE3OTY5fDA&ixlib=rb-4.0.3&q=80&w=1080"
  6. mode="aspectFill">
  7. </image>
  8. <view class="name">林夕三</view>
  9. <view class="organization">温州有极数据科技有限公司</view>
  10. <view class="my-tab">
  11. <view class="tab-box">
  12. <view class="tab-item">
  13. <view class="tab-number">112</view>
  14. <view class="tab-text">房源</view>
  15. </view>
  16. <view class="tab-item">
  17. <view class="tab-number">112</view>
  18. <view class="tab-text">粉丝</view>
  19. </view>
  20. <view class="tab-item">
  21. <view class="tab-number">112</view>
  22. <view class="tab-text">关注</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. }
  33. },
  34. methods: {
  35. }
  36. }
  37. </script>
  38. <style lang="scss">
  39. .my-box {
  40. height: 100vh;
  41. background: #fff;
  42. display: flex;
  43. flex-direction: column;
  44. align-items: center;
  45. .my-top {
  46. height: 260rpx;
  47. background-image: url('https://images.unsplash.com/photo-1558591710-4b4a1ae0f04d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwyMDUzMDJ8MHwxfHNlYXJjaHw1fHxhYnN0cmFjdHxlbnwxfHx8fDE2NTI4OTYzNTU&ixlib=rb-1.2.1&q=80&w=1080');
  48. background-position: center center;
  49. background-size: cover;
  50. background-repeat: no-repeat;
  51. width: 100%;
  52. }
  53. .my-avatar {
  54. width: 200rpx;
  55. height: 200rpx;
  56. border-radius: 50%;
  57. margin-top: -100rpx;
  58. border: 6rpx solid #fff;
  59. }
  60. .name {
  61. font-size: 20px;
  62. font-weight: 700;
  63. margin: 10rpx 0;
  64. }
  65. .organization {
  66. color: $uni-secondary-color;
  67. font-weight: 300;
  68. }
  69. .my-tab {
  70. width: 100%;
  71. padding: 0 30rpx;
  72. box-sizing: border-box;
  73. margin: 40rpx 0;
  74. .tab-box {
  75. height: 160rpx;
  76. border-radius: 24rpx;
  77. box-shadow: 1px 1px 12px rgba(164, 164, 164, 0.25);
  78. display: flex;
  79. align-items: center;
  80. }
  81. .tab-item {
  82. flex: 1;
  83. text-align: center;
  84. }
  85. .tab-number {
  86. font-size: 40rpx;
  87. font-weight: 600;
  88. }
  89. .tab-text {
  90. font-size: 24rpx;
  91. font-weight: 300;
  92. margin-top: 10rpx;
  93. }
  94. }
  95. }
  96. </style>