国外MOSE官网
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.

118 lines
2.4 KiB

1 week ago
  1. <template>
  2. <view class="volunteer-header">
  3. <view class="swiper-container" @click="goToDetail">
  4. <uv-swiper :list="bannerList" indicator indicatorMode="dot" height="270rpx" circular></uv-swiper>
  5. <!-- <view class="header-title">
  6. <text class="title-text">国际志愿者日</text>
  7. <text class="date-text">12/05</text>
  8. </view> -->
  9. <!-- <image class="dove-icon" src="/static/路径 6665@2x.png" mode="aspectFit"></image> -->
  10. </view>
  11. <view class="notice-bar" @click="goToAnnouncement">
  12. <image class="horn-icon" src="/static/首页_小喇叭.png" mode="aspectFit"></image>
  13. <text class="notice-text">最新一条通知公告内容展示</text>
  14. <uv-icon name="arrow-right" color="#999" size="14"></uv-icon>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name: 'VolunteerHeader',
  21. data() {
  22. return {
  23. bannerList: [
  24. '/static/bannerImage.png',
  25. '/static/bannerImage.png',
  26. '/static/bannerImage.png',
  27. ]
  28. }
  29. },
  30. methods: {
  31. goToAnnouncement() {
  32. // 跳转到公告页面
  33. uni.navigateTo({
  34. url: '/subPages/index/announcement'
  35. })
  36. },
  37. goToDetail() {
  38. // 跳转到详情页面
  39. uni.navigateTo({
  40. url: '/subPages/index/activityDetail'
  41. })
  42. }
  43. }
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. .volunteer-header {
  48. width: 100%;
  49. .swiper-container {
  50. position: relative;
  51. margin: 20rpx;
  52. border-radius: 20rpx;
  53. overflow: hidden;
  54. .header-title {
  55. position: absolute;
  56. bottom: 20rpx;
  57. left: 20rpx;
  58. z-index: 10;
  59. display: flex;
  60. flex-direction: column;
  61. background-color: rgba(0,0,0,0.4);
  62. padding: 10rpx 20rpx;
  63. border-radius: 10rpx;
  64. .title-text {
  65. font-size: 36rpx;
  66. font-weight: bold;
  67. color: #fff;
  68. }
  69. .date-text {
  70. font-size: 28rpx;
  71. color: #2c5e2e;
  72. margin-top: 6rpx;
  73. }
  74. }
  75. .dove-icon {
  76. position: absolute;
  77. right: 20rpx;
  78. bottom: 20rpx;
  79. z-index: 10;
  80. width: 70rpx;
  81. height: 70rpx;
  82. background-color: #fff;
  83. border-radius: 50%;
  84. padding: 10rpx;
  85. }
  86. }
  87. .notice-bar {
  88. display: flex;
  89. align-items: center;
  90. background-color: #fff;
  91. padding: 20rpx;
  92. margin: 0 20rpx 20rpx;
  93. border-radius: 12rpx;
  94. // 如何只显示底部阴影
  95. box-shadow: 0rpx 1rpx 0rpx 0rpx #3a94e1; ;
  96. // border-bottom: 1rpx solid #3A94E1;
  97. .horn-icon {
  98. width: 40rpx;
  99. height: 40rpx;
  100. margin-right: 10rpx;
  101. }
  102. .notice-text {
  103. flex: 1;
  104. font-size: 28rpx;
  105. color: $uni-text-color;
  106. }
  107. }
  108. }
  109. </style>