bannerFive.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="banner-wrap banner-three">
  3. <view class="title-wrap">
  4. <view class="title">生态农场指数</view>
  5. <view class="sub-title">通风透光防病虫,覆草种植原生态</view>
  6. </view>
  7. <swiper v-if="boxList.length" class="carousel" style="height: 370px" arrow="always" :interval="5000">
  8. <swiper-item class="carousel-item" v-for="(item, index) in boxList" :key="index">
  9. <view class="name">
  10. <span>{{ item.title }}: {{item.value}}分 </span>
  11. <span class="size">(排名前 {{item.rank}}%)</span>
  12. </view>
  13. <image class="img" :src="item.img" alt="" />
  14. <view class="desc">{{ item.name }}</view>
  15. </swiper-item>
  16. </swiper>
  17. </view>
  18. </template>
  19. <script setup>
  20. import { ref ,watch} from "vue";
  21. const boxList = ref([
  22. {
  23. "value": 92,
  24. "name": "通风优良,树距科学,防风林促进气流,减少病害,提升授粉和果实品质。",
  25. "img": "https://birdseye-img.sysuimars.com/temp/tgl3.png",
  26. "title": "通风率",
  27. "rank": "20"
  28. },
  29. {
  30. "value": 89,
  31. "name": "透光优良,开心形修剪,行距合理,光合高效,果实糖度高,优果率超85%。",
  32. "img": "https://birdseye-img.sysuimars.com/temp/tgl4.jpg",
  33. "title": "透光率",
  34. "rank": "20"
  35. },
  36. {
  37. "value": 88,
  38. "name": "70%益草覆盖,保水土增天敌,减除草剂,有机质+0.5%,生态经济双赢。",
  39. "img": "https://birdseye-img-ali-cdn.sysuimars.com//biodiversityImg/1749134540014.png",
  40. "title": "生物多样性",
  41. "rank": "5"
  42. }
  43. ]);
  44. </script>
  45. <style lang="scss" scoped>
  46. .banner-wrap {
  47. width: 100%;
  48. height: 100%;
  49. background-size: 100% 100%;
  50. background-repeat: no-repeat;
  51. background-position: center center;
  52. .title {
  53. font-size: 36px;
  54. letter-spacing: 4px;
  55. font-family: "jiangxizhuokai";
  56. }
  57. &.banner-three {
  58. background-image: url("https://birdseye-img.sysuimars.com/youwei-uniapp/home/report-banner-3.png");
  59. padding: 60px 14px;
  60. box-sizing: border-box;
  61. .sub-title {
  62. letter-spacing: 3px;
  63. margin-top: 10px;
  64. }
  65. .carousel {
  66. margin-top: 12px;
  67. width: 100%;
  68. ::v-deep {
  69. .el-carousel__button {
  70. width: 5px;
  71. height: 5px;
  72. border-radius: 50%;
  73. }
  74. .el-carousel__arrow{
  75. width: 32px;
  76. height: 32px;
  77. background: rgba(0, 0, 0,0.6);
  78. .el-icon{
  79. font-size: 22px;
  80. font-weight: bold;
  81. }
  82. }
  83. }
  84. .carousel-item {
  85. width: 100%;
  86. height: 100%;
  87. background: rgba(255, 255, 255, 0.6);
  88. border-radius: 12px;
  89. padding: 39px 16px 26px 16px;
  90. box-sizing: border-box;
  91. backdrop-filter: blur(2px);
  92. .name {
  93. position: absolute;
  94. top: 0;
  95. left: calc(50% - 225px / 2);
  96. font-family: "jiangxizhuokai";
  97. padding: 6px;
  98. font-size: 16px;
  99. color: #333333;
  100. text-align: center;
  101. width: 225px;
  102. box-sizing: border-box;
  103. background: url("https://birdseye-img.sysuimars.com/youwei-uniapp/home/name-bg.png") no-repeat center center / 100% 100%;
  104. .size {
  105. font-size: 13px;
  106. }
  107. }
  108. .img{
  109. width: 100%;
  110. height: 240px;
  111. object-fit: cover;
  112. margin: 11px 0;
  113. border-radius: 5px;
  114. }
  115. .desc {
  116. color: #333333;
  117. font-size: 12px;
  118. letter-spacing: 1px;
  119. line-height: 18px;
  120. }
  121. }
  122. }
  123. }
  124. }
  125. </style>