小说小程序前端代码仓库(小程序)
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.

233 lines
6.5 KiB

  1. <template>
  2. <view class="tipping-page">
  3. <!-- 顶部导航栏 -->
  4. <uv-navbar title="读者亲密值榜单" fixed placeholder></uv-navbar>
  5. <!-- 榜单前三名 -->
  6. <view class="top-three">
  7. <view class="top-item second">
  8. <image class="avatar" :src="topList[1].avatar" mode="aspectFill" />
  9. <view class="name">{{ topList[1].name }}</view>
  10. <view class="score">{{ topList[1].score }} 亲密值</view>
  11. <view class="level">护书使者 五级</view>
  12. </view>
  13. <view class="top-item first">
  14. <image class="avatar" :src="topList[0].avatar" mode="aspectFill" />
  15. <view class="name">{{ topList[0].name }}</view>
  16. <view class="score">{{ topList[0].score }} 亲密值</view>
  17. <view class="level">护书使者 五级</view>
  18. </view>
  19. <view class="top-item third">
  20. <image class="avatar" :src="topList[2].avatar" mode="aspectFill" />
  21. <view class="name">{{ topList[2].name }}</view>
  22. <view class="score">{{ topList[2].score }} 亲密值</view>
  23. <view class="level">护书使者 五级</view>
  24. </view>
  25. </view>
  26. <!-- 榜单列表 -->
  27. <view class="rank-list">
  28. <RankListItem
  29. v-for="(item, idx) in rankList"
  30. :key="item.id"
  31. :rankIcon="idx < 3 ? rankIcons[idx] : ''"
  32. :rankNumImg="idx >= 3 ? ('/static/rank-num-' + (idx+1) + '.png') : ''"
  33. medal="/static/medal.png"
  34. :avatar="item.avatar"
  35. :name="item.name"
  36. :score="item.score"
  37. level="护书使者 五级"
  38. />
  39. </view>
  40. <!-- 底部按钮 -->
  41. <view class="bottom-btn-area">
  42. <button class="tipping-btn">互动打赏</button>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import RankListItem from '@/components/novel/RankListItem.vue'
  48. export default {
  49. components: { RankListItem },
  50. data() {
  51. return {
  52. topList: [
  53. {
  54. avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
  55. name: '周海',
  56. score: 6785452
  57. },
  58. {
  59. avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
  60. name: '冯冉冉',
  61. score: 6785452
  62. },
  63. {
  64. avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
  65. name: '南静',
  66. score: 6785452
  67. }
  68. ],
  69. rankList: [
  70. { id: 4, avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain', name: '钱胡胡', score: 5325324 },
  71. { id: 5, avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain', name: '冯艺瑄', score: 4819704 },
  72. { id: 6, avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain', name: '王凡宏', score: 4696874 },
  73. { id: 7, avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain', name: '辛书萍', score: 3722953 },
  74. { id: 8, avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain', name: '李婷', score: 2872476 },
  75. { id: 9, avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain', name: '郑盈', score: 2464869 },
  76. { id: 10, avatar: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain', name: '吴承联', score: 990238 }
  77. ],
  78. rankIcons: [
  79. 'https://img.yzcdn.cn/vant/rank-1.png',
  80. 'https://img.yzcdn.cn/vant/rank-2.png',
  81. 'https://img.yzcdn.cn/vant/rank-3.png'
  82. ]
  83. }
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .tipping-page {
  89. min-height: 100vh;
  90. background: linear-gradient(180deg, #b86e3b 0%, #e6b07c 100%);
  91. padding-bottom: 40rpx;
  92. }
  93. .top-three {
  94. display: flex;
  95. justify-content: center;
  96. align-items: flex-end;
  97. margin: 40rpx 0 20rpx 0;
  98. .top-item {
  99. display: flex;
  100. flex-direction: column;
  101. align-items: center;
  102. background: #fff7e0;
  103. border-radius: 20rpx;
  104. margin: 0 16rpx;
  105. padding: 24rpx 18rpx 18rpx 18rpx;
  106. box-shadow: 0 4rpx 16rpx 0 rgba(0,0,0,0.08);
  107. position: relative;
  108. width: 180rpx;
  109. .avatar {
  110. width: 90rpx;
  111. height: 90rpx;
  112. border-radius: 50%;
  113. border: 4rpx solid #ffd700;
  114. margin-bottom: 10rpx;
  115. }
  116. .name {
  117. font-size: 28rpx;
  118. font-weight: bold;
  119. color: #b86e3b;
  120. margin-bottom: 6rpx;
  121. }
  122. .score {
  123. font-size: 24rpx;
  124. color: #e6b07c;
  125. margin-bottom: 4rpx;
  126. }
  127. .level {
  128. font-size: 22rpx;
  129. color: #b86e3b;
  130. background: #ffe7b2;
  131. border-radius: 10rpx;
  132. padding: 2rpx 12rpx;
  133. }
  134. }
  135. .first {
  136. transform: scale(1.15);
  137. z-index: 2;
  138. background: #fffbe6;
  139. box-shadow: 0 8rpx 24rpx 0 rgba(255,215,0,0.18);
  140. }
  141. .second, .third {
  142. z-index: 1;
  143. opacity: 0.95;
  144. }
  145. }
  146. .rank-list {
  147. background: transparent;
  148. margin: 0 24rpx;
  149. margin-top: 20rpx;
  150. .rank-item {
  151. display: flex;
  152. align-items: center;
  153. justify-content: space-between;
  154. background: #fffbe6;
  155. border-radius: 16rpx;
  156. margin-bottom: 18rpx;
  157. box-shadow: 0 2rpx 8rpx 0 rgba(184,110,59,0.06);
  158. padding: 0 24rpx;
  159. height: 100rpx;
  160. .rank-left {
  161. display: flex;
  162. align-items: center;
  163. .rank-icon, .rank-num-img {
  164. width: 38rpx;
  165. height: 38rpx;
  166. margin-right: 10rpx;
  167. }
  168. .medal {
  169. width: 44rpx;
  170. height: 44rpx;
  171. margin-right: 10rpx;
  172. }
  173. .avatar {
  174. width: 44rpx;
  175. height: 44rpx;
  176. border-radius: 50%;
  177. margin-right: 14rpx;
  178. border: 2rpx solid #ffd700;
  179. object-fit: cover;
  180. }
  181. .name {
  182. font-size: 26rpx;
  183. color: #222;
  184. font-weight: 500;
  185. }
  186. }
  187. .rank-right {
  188. display: flex;
  189. flex-direction: column;
  190. align-items: flex-end;
  191. .score {
  192. font-size: 22rpx;
  193. color: #b86e3b;
  194. }
  195. .level {
  196. font-size: 20rpx;
  197. color: #fff;
  198. background: #e6b07c;
  199. border-radius: 8rpx;
  200. padding: 2rpx 10rpx;
  201. margin-top: 6rpx;
  202. font-weight: 500;
  203. }
  204. }
  205. }
  206. }
  207. .bottom-btn-area {
  208. margin: 40rpx 24rpx 90rpx 24rpx;
  209. display: flex;
  210. flex-direction: column;
  211. gap: 24rpx;
  212. .tipping-btn {
  213. width: 100%;
  214. height: 80rpx;
  215. background: #fffbe6;
  216. color: #b86e3b;
  217. font-size: 32rpx;
  218. border-radius: 40rpx;
  219. font-weight: bold;
  220. letter-spacing: 2rpx;
  221. box-shadow: 0 4rpx 16rpx 0 rgba(184,110,59,0.12);
  222. border: none;
  223. }
  224. }
  225. </style>