myMusic.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view>
  3. <view class="bg-img flex align-center" style="background-image: url('/static/personBgImg.png');height: 450upx;"></view>
  4. <view class="head">
  5. <view class="cu-avatar avatar round" :style="[{backgroundImage:'url('+ avatar +')'}]"></view>
  6. <view style="margin: 0 30upx 30upx 70upx;">
  7. <view class="flex align-center">
  8. <view class="text-black text-bold text-xl padding-right">{{name}}</view>
  9. <image src="/static/icon-vip.png" style="width: 30upx;height: 34upx;"></image>
  10. </view>
  11. <view class="padding-tb">
  12. <view class="rank">
  13. <text class="text-bold padding-right-sm" style="font-style: italic;">NO.{{rank}}</text>
  14. <text class="text-sm">今日排名</text>
  15. </view>
  16. </view>
  17. <view class="flex align-center">
  18. <view>
  19. <text class="text-sm">共获热力</text>
  20. <text class="cuIcon-hotfill padding-lr-xs"></text>
  21. <text class="text-lg text-bold">22386</text>
  22. </view>
  23. <view style="height: 20upx;border: #dadada 1px solid; margin: 0 30upx;"></view>
  24. <view>
  25. <text class="text-sm">总值</text>
  26. <text class="padding-left-xs">¥</text>
  27. <text class="text-lg text-bold">1888</text>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="margin-top bg-white">
  33. <view class="padding-sm flex justify-between align-center">
  34. <view class="margin-left-sm text-lg text-black text-bold">我的作品</view>
  35. <button class="cu-btn theme-bg-color round text-white margin-right" @click="onTap">添加作品</button>
  36. </view>
  37. </view>
  38. <block v-for="(item, index) in 8" :key="index">
  39. <view class="flex bg-white" style="padding: 10upx 70upx 30upx 70upx;">
  40. <image src="/static/musicCover.png" style="width: 120upx;height: 120upx;margin-right: 20upx;"></image>
  41. <view style="width: 75%;">
  42. <view class="flex justify-between">
  43. <view class="music">
  44. <view class="name">海底(Live)</view>
  45. <view class="author">凤凰传奇 - 为他而歌</view>
  46. </view>
  47. <view>
  48. <view class="text-black">
  49. <text class="cuIcon-hotfill padding-right-xs"></text>
  50. <text class="text-lg text-bold">22386</text>
  51. </view>
  52. <view class="music-rank">NO.10</view>
  53. </view>
  54. </view>
  55. <view class="margin-top-sm"><u-line color="#cacaca"></u-line> </view>
  56. </view>
  57. </view>
  58. </block>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. data() {
  64. return {
  65. name: "Daniel Hua",
  66. avatar: '/static/avatar2.png',
  67. rank: 108,
  68. }
  69. },
  70. methods: {
  71. onTap() {
  72. uni.navigateTo({
  73. url: "/pages/activity/signUp",
  74. })
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .head {
  81. background-color: #ffffff;
  82. margin-top: -26upx;
  83. height: 320upx;
  84. border-radius: 26upx 26upx 0 0;
  85. }
  86. .avatar {
  87. width: 130upx;
  88. height: 130upx;
  89. margin: -60upx 0 30upx 80upx;
  90. }
  91. .rank {
  92. display: flex;
  93. justify-content: center;
  94. background-color: #583be6;
  95. width: 40%;
  96. color: #ffffff;
  97. border-radius: 16upx;
  98. line-height: 60upx;
  99. }
  100. .music {
  101. .name {
  102. font-size: 28upx;
  103. font-family: PingFang SC;
  104. font-weight: 400;
  105. color: #000000;
  106. padding-bottom: 20upx;
  107. }
  108. .author {
  109. font-size: 14upx;
  110. font-family: PingFang SC;
  111. font-weight: 400;
  112. color: #9A9A9A;
  113. }
  114. }
  115. .music-rank {
  116. display: flex;
  117. margin-top: 18upx;
  118. line-height: 40upx;
  119. justify-content: center;
  120. border: #9d9d9d 1px solid;
  121. color: #9d9d9d;
  122. border-radius: 50upx;
  123. font-style: italic;
  124. }
  125. </style>