小说小程序前端代码仓库(小程序)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
2.1 KiB

  1. <template>
  2. <view class="rank-item">
  3. <view class="rank-left">
  4. <!-- <image src="@/pages_order/static/top/4.png" class="rank-icon" /> -->
  5. <view class="rank-icon">
  6. {{ index }}
  7. </view>
  8. <image src="@/pages_order/static/book/dj.png" class="rank-num-img" />
  9. <image class="avatar" :src="item.hanHaiMember
  10. && item.hanHaiMember.headImage" mode="aspectFill" />
  11. <view class="name">{{
  12. item.hanHaiMember
  13. && item.hanHaiMember.nickName
  14. }}</view>
  15. </view>
  16. <view class="rank-right">
  17. <view class="score">
  18. {{
  19. item.hanHaiMember
  20. && item.num
  21. }}
  22. 亲密值</view>
  23. <view class="level">
  24. {{
  25. item.commonBookAchievement
  26. && (item.commonBookAchievement.oldName || item.commonBookAchievement.title)
  27. }}
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. name: 'RankListItem',
  35. props: {
  36. index : {
  37. },
  38. item : {
  39. default : {}
  40. }
  41. },
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .rank-item {
  46. display: flex;
  47. align-items: center;
  48. justify-content: space-between;
  49. background: linear-gradient(to bottom, #FBEBC5, #FDF9DD);
  50. border-radius: 16rpx;
  51. margin-bottom: 18rpx;
  52. box-shadow: 0 2rpx 8rpx 0 rgba(184, 110, 59, 0.06);
  53. padding: 24rpx;
  54. .rank-left {
  55. display: flex;
  56. align-items: center;
  57. .rank-icon,
  58. .rank-num-img {
  59. width: 60rpx;
  60. height: 60rpx;
  61. margin-right: 10rpx;
  62. display: flex;
  63. justify-content: center;
  64. align-items: center;
  65. font-size: 34rpx;
  66. font-weight: 900;
  67. color: #684427;
  68. }
  69. .avatar {
  70. width: 60rpx;
  71. height: 60rpx;
  72. border-radius: 50%;
  73. margin-right: 14rpx;
  74. object-fit: cover;
  75. }
  76. .name {
  77. font-size: 26rpx;
  78. color: #222;
  79. font-weight: 500;
  80. }
  81. }
  82. .rank-right {
  83. display: flex;
  84. flex-direction: column;
  85. align-items: flex-end;
  86. gap: 10rpx;
  87. .score {
  88. font-size: 22rpx;
  89. color: #684427;
  90. }
  91. .level {
  92. font-size: 20rpx;
  93. color: #C28E00;
  94. background: #FFE8A8;
  95. border-radius: 8rpx;
  96. padding: 2rpx 10rpx;
  97. margin-top: 6rpx;
  98. font-weight: 500;
  99. }
  100. }
  101. }
  102. </style>