crownshare.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="crownshare">
  3. <image src="../../static/icon/crownsharebanner.png" mode="scaleToFill" class="banner"></image>
  4. <image src="../../static/icon/crownsharetitle.png" mode="scaleToFill" class="title"></image>
  5. <text class="titletext">第{{ season }}季大卫博士争霸赛</text>
  6. <view class="content">
  7. <view class="top">
  8. <view class="left">
  9. <image :src="top.length ? top[1].avatar : ''" mode="scaleToFill"></image>
  10. <text class="name">{{ top.length ? top[1].name : '' }}</text>
  11. <text class="text">学分数</text>
  12. <text class="score">{{ top.length ? top[1].score : '' }}</text>
  13. </view>
  14. <view class="center">
  15. <image :src="top.length ? top[0].avatar : ''" mode="scaleToFill"></image>
  16. <text class="name">{{ top.length ? top[0].name : '' }}</text>
  17. <text class="text">学分数</text>
  18. <text class="score">{{ top.length ? top[0].score : '' }}</text>
  19. </view>
  20. <view class="right">
  21. <image :src="top.length ? top[2].avatar : ''" mode="scaleToFill"></image>
  22. <text class="name">{{ top.length ? top[2].name : '' }}</text>
  23. <text class="text">学分数</text>
  24. <text class="score">{{ top.length ? top[2].score : '' }}</text>
  25. </view>
  26. </view>
  27. <view class="list">
  28. <view class="item" v-for="(item, index) in list" :key="index" :class="item.self ? 'self' : ''">
  29. <text class="rank">No.{{ item.rank }}</text>
  30. <image :src="item.avatar" mode="aspectFill"></image>
  31. <text class="name">{{ item.name }}</text>
  32. <text class="score">{{ item.score }}</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="contentbg">
  37. <view class="top">
  38. <view class="left" style="background: #FFB121;"></view>
  39. <view class="center" style="background: #FFB121;"></view>
  40. <view class="right" style="background: #FFB121;"></view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data() {
  48. return {
  49. top: [],
  50. list: [],
  51. season: ''
  52. }
  53. },
  54. onLoad(opt) {
  55. this.$hideLoading() //取消loading
  56. this.top = JSON.parse(opt.top)
  57. this.list = JSON.parse(opt.list)
  58. this.season = opt.season || 23
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .crownshare {
  64. height: 100%;
  65. box-sizing: border-box;
  66. border-top: 385rpx solid #FF5A3F;
  67. background: #FFD157;
  68. position: relative;
  69. .banner {
  70. position: fixed;
  71. width: 690rpx;
  72. height: 292rpx;
  73. top: 30rpx;
  74. left: 30rpx;
  75. }
  76. .title, .titletext {
  77. position: fixed;
  78. width: 527rpx;
  79. height: 82rpx;
  80. left: 50%;
  81. top: 337rpx;
  82. text-align: center;
  83. transform: translateX(-50%);
  84. line-height: 70rpx;
  85. font-size: 32rpx;
  86. color: #FFFFFF;
  87. }
  88. .content, .contentbg {
  89. background: #FFFFFF;
  90. position: absolute;
  91. top: 107rpx;
  92. left: 30rpx;
  93. right: 30rpx;
  94. bottom: 50rpx;
  95. z-index: 1;
  96. display: flex;
  97. flex-direction: column;
  98. border-radius: 10rpx;
  99. &.contentbg {
  100. z-index: 0;
  101. top: 100rpx;
  102. background: #FFB121;
  103. }
  104. .top {
  105. width: 100%;
  106. height: 326rpx;
  107. position: relative;
  108. border-radius: 10rpx;
  109. view {
  110. position: absolute;
  111. width: 230rpx;
  112. height: 100%;
  113. border-radius: 10rpx;
  114. background: #FFFFFF;
  115. display: flex;
  116. flex-direction: column;
  117. justify-content: flex-end;
  118. align-items: center;
  119. image {
  120. width: 130rpx;
  121. height: 130rpx;
  122. border-radius: 50%;
  123. margin-bottom: 12rpx;
  124. }
  125. .name {
  126. font-size: 28rpx;
  127. color: #000000;
  128. margin-bottom: 10rpx;
  129. }
  130. .text {
  131. font-size: 18rpx;
  132. color: #666666;
  133. margin-bottom: 10rpx;
  134. }
  135. .score {
  136. color: #FEB21F;
  137. font-size: 46rpx;
  138. margin-bottom: 17rpx;
  139. }
  140. &.left {
  141. top: 0rpx;
  142. left: 0;
  143. }
  144. &.center {
  145. height: 356rpx;
  146. top: -50rpx;
  147. left: 230rpx;
  148. height: 376rpx;
  149. }
  150. &.right {
  151. top: 0;
  152. right: 0;
  153. }
  154. }
  155. }
  156. .list {
  157. width: 100%;
  158. flex: 1;
  159. display: flex;
  160. flex-direction: column;
  161. .item {
  162. width: 100%;
  163. flex: 1;
  164. display: flex;
  165. align-items: center;
  166. box-sizing: border-box;
  167. padding: 0 77rpx;
  168. .rank {
  169. font-size: 20rpx;
  170. color: #EE722D;
  171. width: 84rpx;
  172. }
  173. image {
  174. width: 70rpx;
  175. height: 70rpx;
  176. border-radius: 50%;
  177. margin-right: 24rpx;
  178. }
  179. .name {
  180. font-size: 24rpx;
  181. color: #484647;
  182. margin-right: 20rpx;
  183. width: 230rpx;
  184. }
  185. .score {
  186. flex: 1;
  187. font-size: 24rpx;
  188. color: #FEB21F;
  189. font-weight: bolder;
  190. }
  191. &.self {
  192. background: rgba(254, 83, 27, .15);;
  193. }
  194. }
  195. }
  196. }
  197. }
  198. </style>