songRank.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view>
  3. <view class="bg-img flex justify-center align-center" style="background-image: url('/static/songRank/songRankBgImg.png');height: 402upx;">
  4. <view class="title">歌曲排行榜</view>
  5. </view>
  6. <view class="flex justify-center align-center padding-bottom">
  7. <view class="search">
  8. <text class="cuIcon-search padding-right-xs"></text>
  9. {{searValue}}
  10. </view>
  11. </view>
  12. <u-sticky h5-nav-height="0">
  13. <u-tabs :list="list" active-color="#5c40e8" :bold="false" :is-scroll="false" :current="current" @change="change"></u-tabs>
  14. </u-sticky>
  15. <view class="flex align-center padding-left" style="margin-top: 40upx;">
  16. <image src="/static/songRank/medal.png" style="width: 32upx;height: 40upx"></image>
  17. <view style="font-size: 36upx;font-weight: 800;color: #000000;padding-left: 20upx;">提名歌曲</view>
  18. </view>
  19. <block v-for="(item, index) in songList" :key="index">
  20. <block v-if="index == 0 || index == 1 || index == 2">
  21. <view class="margin-sm flex align-center" :class="index == 0 ? 'first' : index == 1 ? 'second' : index == 2 ? 'third' : '' ">
  22. <u-image width="200" height="200" :src="item.coverImg"></u-image>
  23. <view class="flex justify-between container" :style="{width: (index == 0 ? '70%': index == 1 ? '69%' : index == 2 ? '68%' : '60%')}">
  24. <view class="left" style="width: 65%;">
  25. <view class="name text-cut">{{item.name}}</view>
  26. <view class="padding-tb-sm text-sm">{{item.singer}}</view>
  27. <view class="hot-value">热力值 {{item.hotVaule}}</view>
  28. </view>
  29. <view class="right">
  30. <view class="rank" :style="{coloar: (index == 0 ? '#ECDA47': index == 1 ? '#C1D4DA' : index == 2 ? '#C1D4DA' : '')}">
  31. NO.{{index + 1}}
  32. </view>
  33. <view>
  34. <button class="cu-btn round theme-bg-color sm text-white">
  35. <text class="cuIcon-hotfill"></text>
  36. <text class="padding-left-xs">打榜</text>
  37. </button>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </block>
  43. <block v-else>
  44. <view class="flex" style="padding: 10upx 30upx 30upx 40upx;">
  45. <view class="flex justify-center align-center text-bold text-lg padding-right">{{index + 1}}</view>
  46. <image :src="item.coverImg" style="width: 120upx;height: 120upx;margin-right: 20upx;"></image>
  47. <view style="width: 70%;">
  48. <view class="flex justify-between">
  49. <view class="music" style="width: 75%;">
  50. <view class="name text-cut">{{item.name}}</view>
  51. <view class="author">{{item.singer}}</view>
  52. <view class="hot-vaule">热力值 {{item.hotVaule}}</view>
  53. </view>
  54. <view class="flex align-end">
  55. <button class="cu-btn round lines-purple sm" style="width: 110upx;">打榜</button>
  56. </view>
  57. </view>
  58. <view class="margin-top-xs"><u-line color="#cacaca"></u-line> </view>
  59. </view>
  60. </view>
  61. </block>
  62. </block>
  63. </view>
  64. </template>
  65. <script>
  66. export default {
  67. data() {
  68. return {
  69. current: 0,
  70. list: [{
  71. name: '全部'
  72. }, {
  73. name: '男歌手榜'
  74. }, {
  75. name: '女歌手榜'
  76. }, {
  77. name: '组合榜'
  78. }],
  79. searValue: '不存在的关系 - XMASwu',
  80. songList: [
  81. {coverImg: '/static/songRank/fm1.png', name: '巴赫旧约', singer: '沈以诚', hotVaule: '3.5w'},
  82. {coverImg: '/static/songRank/fm2.png', name: '1987我不知会遇见你', singer: '孟慧圆/邓见超', hotVaule: '3.5w'},
  83. {coverImg: '/static/songRank/fm3.png', name: '孤影', singer: 'C-BLOCK', hotVaule: '3.5w'},
  84. {coverImg: '/static/musicCover.png', name: '海底(live)', singer: '凤凰传奇', hotVaule: '3.5w'},
  85. {coverImg: '/static/songRank/fm4.png', name: '一次就好', singer: '理迎趣', hotVaule: '3.5w'},
  86. {coverImg: '/static/songRank/fm1.png', name: '巴赫旧约', singer: '沈以诚', hotVaule: '3.5w'},
  87. {coverImg: '/static/songRank/fm2.png', name: '1987我不知会遇见你', singer: '孟慧圆/邓见超', hotVaule: '3.5w'},
  88. {coverImg: '/static/songRank/fm3.png', name: '孤影', singer: 'C-BLOCK', hotVaule: '3.5w'},
  89. {coverImg: '/static/musicCover.png', name: '海底(live)', singer: '凤凰传奇', hotVaule: '3.5w'},
  90. {coverImg: '/static/songRank/fm4.png', name: '一次就好', singer: '理迎趣', hotVaule: '3.5w'}
  91. ]
  92. }
  93. },
  94. methods: {
  95. change(index) {
  96. this.current = index;
  97. }
  98. }
  99. }
  100. </script>
  101. <style lang="scss" scoped>
  102. .search {
  103. margin-top: -40upx;
  104. width: 80%;
  105. border-radius: 50upx;
  106. line-height: 60upx;
  107. background-color: #FFFFFF;
  108. display: flex;
  109. justify-content: center;
  110. align-items: center;
  111. color: #9D9D9D;
  112. font-size: 20upx;
  113. box-shadow: 10upx 20upx 60upx #d8d8d8;
  114. }
  115. .title {
  116. font-size: 56upx;
  117. font-family: PingFang SC;
  118. font-weight: 800;
  119. color: #FFFFFF;
  120. }
  121. .first {
  122. background-color: #fbf8e5;
  123. border-radius: 20upx;
  124. box-shadow: -1upx -1upx 60upx #d8d8d8;
  125. }
  126. .second {
  127. background-color: #f0f5f9;
  128. border-radius: 20upx;
  129. box-shadow: -1upx -1upx 60upx #d8d8d8;
  130. margin: 0 30upx;
  131. }
  132. .third {
  133. background-color: #fef0ef;
  134. border-radius: 20upx;
  135. box-shadow: -1upx -1upx 60upx #d8d8d8;
  136. margin: 20upx 40upx;
  137. }
  138. .container {
  139. .left {
  140. padding-left: 20upx;
  141. .name {
  142. font-size: 30upx;
  143. font-family: PingFang SC;
  144. font-weight: 800;
  145. color: #000000;
  146. }
  147. .hot-value {
  148. font-size: 24upx;
  149. font-family: PingFang SC;
  150. font-weight: 400;
  151. color: #3F372A;
  152. }
  153. }
  154. .right {
  155. text-align: center;
  156. padding-right: 10upx;
  157. .rank {
  158. height: 70%;
  159. font-size: 36upx;
  160. font-family: PingFang SC;
  161. font-weight: 800;
  162. font-style: italic;
  163. }
  164. }
  165. }
  166. .music {
  167. .name {
  168. font-size: 30upx;
  169. font-family: PingFang SC;
  170. font-weight: 400;
  171. color: #000000;
  172. }
  173. .author {
  174. font-size: 14upx;
  175. font-family: PingFang SC;
  176. font-weight: 400;
  177. color: #9A9A9A;
  178. }
  179. .hot-vaule {
  180. margin-top: 10upx;
  181. font-size: 14upx;
  182. font-family: PingFang SC;
  183. font-weight: 400;
  184. color: #3F372A;
  185. }
  186. }
  187. .lines-purple::after {
  188. border-color: #5a3ee8;
  189. }
  190. .lines-purple {
  191. color: #5a3ee8;
  192. }
  193. </style>