index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view>
  3. <view class="bg-white" style="padding: 30upx; 30upx 0upx 30upx">
  4. <u-swiper height="268" :list="imgList" bg-color="#fff" interval="5000"></u-swiper>
  5. </view>
  6. <view>
  7. <search-bar :disabled="false" @onSearch="onSearch" placeholder="请输入活动名称"></search-bar>
  8. </view>
  9. <view class="padding-lr-sm bg-white flex flex-wrap" style="padding-bottom: 10upx;">
  10. <block v-for="(item, index) in activityTags" :key="index">
  11. <view class="activity-tag">{{item}}</view>
  12. </block>
  13. </view>
  14. <view class="container" @click="navWithParm">
  15. <view class="flex align-center">
  16. <view style="margin: 30upx 0 10upx 20upx;">
  17. <image src="/static/index/huodong1.png" style="width: 234upx;height: 188upx;"></image>
  18. </view>
  19. <view class="padding-lr-sm">
  20. <view class="flex">
  21. <view style="width: 80%">
  22. <view class="text-lg text-bold">音乐先锋榜</view>
  23. <view class="text-sm margin-tb-xs">2021.07.01 - 2021.12.31</view>
  24. <view class="text-sm text-cut-2">
  25. 简介: 面向中国及海外22岁以下的非专业音乐学习者,包括在中国生活学习的外国友人
  26. </view>
  27. </view>
  28. <view style="margin-top: 10upx;">
  29. <image src="/static/index/ing.png" style="width: 83upx;height: 73upx;"></image>
  30. </view>
  31. </view>
  32. <!-- <view class="text-sm flex flex-wrap">
  33. <block v-for="(item, index) in awardTags" :key="index">
  34. <view class="award-tag">{{item}}</view>
  35. </block>
  36. </view> -->
  37. </view>
  38. </view>
  39. <view class="flex justify-end padding-right-sm">
  40. <block v-for="(item, index) in tags" :key="index">
  41. <view class="tag">{{item}}</view>
  42. </block>
  43. </view>
  44. <view class="flex align-center justify-end text-sm" style="padding: 20upx 30upx 30upx ;">
  45. <text class="cuIcon-hotfill text-orange"></text>
  46. <view class="padding-left-xs">已有1.2万人报名</view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import searchBar from "@/components/basic/search-bar.vue";
  53. export default {
  54. components: {searchBar},
  55. data() {
  56. return {
  57. imgList: [
  58. {image: '/static/index/swiper.png'},
  59. {image: '/static/index/swiper.png'},
  60. {image: '/static/index/swiper.png'}
  61. ],
  62. activityTags: ['K歌之王','城市争霸','CF城市争霸赛', '主持人比赛'],
  63. awardTags: ['1万RMB','点歌机','100000积分'],
  64. tags: ['音乐','交友','竞技','全国','积分']
  65. }
  66. },
  67. onLoad() {
  68. console.log("路过");
  69. },
  70. methods: {
  71. navWithParm() {
  72. uni.navigateTo({
  73. url: "/pages/home/home"
  74. })
  75. },
  76. onSearch(item) {
  77. console.log(item)
  78. }
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .activity-tag {
  84. margin: 10upx;
  85. padding: 0 10upx;
  86. font-size: 24upx;
  87. line-height: 40upx;
  88. background-color: #efefef;
  89. border-radius: 16upx;
  90. }
  91. .award-tag {
  92. margin: 10upx;
  93. padding: 0 10upx;
  94. font-size: 20upx;
  95. line-height: 40upx;
  96. background-color: #fff0d9;
  97. border-radius: 10upx;
  98. color: #feac65;
  99. }
  100. .tag {
  101. border-radius: 30upx;
  102. border: #fd8678 1upx solid;
  103. color: #fd8678;
  104. background-color: #FFFFFF;
  105. line-height: 40upx;
  106. font-size: 20upx;
  107. padding: 0 20upx;
  108. margin: 0 8upx;
  109. }
  110. .container {
  111. margin: 20upx;
  112. background-color: #FFFFFF;
  113. border-radius: 20upx;
  114. }
  115. </style>