y-PersionInfo.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view class="info-wrap">
  3. <view class="top-box flex-center">
  4. <image :src="info.avatarUrl" mode="widthFix" class="filter"></image>
  5. </view>
  6. <view class="mine-top">
  7. <view class="avatar-wrap">
  8. <view class="avatar flex-center">
  9. <image :src="info.avatarUrl" mode="widthFix" class="img"></image>
  10. </view>
  11. <view class="cu-tag badge ycShake" :class="info.gender == 0 ? 'cuIcon-female bg-pink' : 'cuIcon-male bg-blue'"></view>
  12. <view class="name">
  13. <p>{{ info.nickName }}</p>
  14. <p class="motto">虽然你我会下落不明,你知道我曾为你动过情</p>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="top-menu">
  19. <view class="menu-box flex-center" v-for="(item, index) in menuList" :key="index" @tap="handleMenu(index)">
  20. <text class="title">{{ item.num }}</text>
  21. <text>{{ item.name }}</text>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. props: {
  29. info: {
  30. type: Object
  31. }
  32. },
  33. data() {
  34. return {
  35. menuList: [{
  36. name: '喜欢',
  37. num: 20
  38. }, {
  39. name: '关注',
  40. num: 20
  41. }, {
  42. name: '粉丝',
  43. num: 20
  44. }]
  45. };
  46. },
  47. methods:{
  48. handleMenu(index){
  49. this.$emit('change',index)
  50. }
  51. }
  52. };
  53. </script>
  54. <style lang="less" scoped>
  55. .info-wrap {
  56. position: relative;
  57. .top-box {
  58. position: absolute;
  59. top: 0;
  60. width: 100%;
  61. height: 400rpx;
  62. overflow: hidden;
  63. border-radius: 0 0px 100rpx 100rpx;
  64. .filter {
  65. width: 100%;
  66. filter: brightness(0.8) blur(10rpx);
  67. }
  68. }
  69. .mine-top {
  70. position: relative;
  71. display: flex;
  72. align-items: center;
  73. justify-content: center;
  74. flex-direction: column;
  75. padding: 40rpx 20rpx;
  76. border-radius: 0 0px 100rpx 100rpx;
  77. height: 400rpx;
  78. .avatar-wrap {
  79. position: relative;
  80. display: flex;
  81. align-items: center;
  82. width: 100%;
  83. padding: 0 40rpx 20rpx;
  84. .cu-tag{
  85. top: 0;
  86. left: 110rpx;
  87. }
  88. .avatar {
  89. position: relative;
  90. width: 100rpx;
  91. height: 100rpx;
  92. border-radius: 50%;
  93. overflow: hidden;
  94. .img {
  95. width: 100%;
  96. height: 100rpx;
  97. overflow: hidden;
  98. border-radius: 50%;
  99. }
  100. }
  101. .name {
  102. width: 520rpx;
  103. overflow: hidden;
  104. font-size: 36rpx;
  105. color: #fff;
  106. padding-left: 40rpx;
  107. .motto {
  108. white-space: nowrap;
  109. overflow: hidden;
  110. text-overflow: ellipsis;
  111. font-size: 24rpx;
  112. padding: 20rpx 0;
  113. }
  114. }
  115. }
  116. .fans-item {
  117. display: flex;
  118. align-items: center;
  119. width: 100%;
  120. .item {
  121. display: flex;
  122. flex-direction: column;
  123. flex: 1;
  124. color: #ffffff;
  125. text-align: center;
  126. font-size: 32rpx;
  127. .title {
  128. font-size: 32rpx;
  129. font-family: aliM;
  130. padding-top: 20rpx;
  131. }
  132. }
  133. }
  134. }
  135. .top-menu {
  136. position: absolute;
  137. right: 40rpx;
  138. left: 40rpx;
  139. bottom: -80rpx;
  140. height: 180rpx;
  141. display: flex;
  142. justify-content: space-around;
  143. align-items: center;
  144. padding: 40rpx;
  145. color: var(--mainColor);
  146. background-color: #fff;
  147. border-radius: 16rpx;
  148. line-height: 46rpx;
  149. text-align: left;
  150. font-size: 28rpx;
  151. .menu-box {
  152. display: flex;
  153. flex-direction: column;
  154. flex: 1;
  155. font-size: 24rpx;
  156. .title {
  157. color: var(--activeColor);
  158. font-size: 48rpx;
  159. padding-bottom: 20rpx;
  160. }
  161. }
  162. }
  163. }
  164. </style>