banner.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view>
  3. <view class="swiper-banner-box" >
  4. <swiper class="tui-banner-swiper tui-banner tui-skeleton-fillet" :autoplay="true" :interval="5000" :duration="500" @change="swiperChange" :circular="true">
  5. <swiper-item v-for="(item,index) in list" :key="index" @click.stop="NavToDetailPage(item)">
  6. <image :src="item.image" class="tui-slide-image" mode="scaleToFill"/>
  7. </swiper-item>
  8. </swiper>
  9. <view class="swiper__dots-box" v-if="list.length > 1">
  10. <view v-for="(item,idx) in list"
  11. :key="idx"
  12. :class="[idx===current?'swiper__dots-long':'none']"
  13. :data-index="current" class="swiper__dots-item">
  14. </view>
  15. </view>
  16. </view>
  17. <view class="swiper-banner-msg">
  18. <view class="content">
  19. <view class="item le">
  20. <text class="iconfont icon-zhengpin"><text class="sm">正品保证</text></text>
  21. </view>
  22. <view class="item ce">
  23. <text class="iconfont icon-jigou"><text class="sm">5000+机构</text></text>
  24. </view>
  25. <view class="item ri">
  26. <text class="iconfont icon-gongyingshang"><text class="sm">100+供应商</text></text>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default{
  34. name:"address",
  35. props:{
  36. list:{
  37. type:Array
  38. }
  39. },
  40. data() {
  41. return{
  42. current:0
  43. }
  44. },
  45. created(){
  46. },
  47. computed: {
  48. },
  49. methods:{
  50. swiperChange(e) {//轮播图切换
  51. const index = e.detail.current;
  52. this.current = index;
  53. },
  54. NavToDetailPage(floor) {//跳转
  55. this.$api.FlooryNavigateTo(floor)
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .swiper-banner-box{
  62. width: 100%;
  63. height: 360rpx;
  64. padding-top:100rpx;
  65. background:#FFFFFF url(https://img.caimei365.com/group1/M00/03/B0/Cmis217Z9LCALu9wAAAv45Bdpsk814.png)no-repeat;
  66. position: relative;
  67. background-size: cover;
  68. }
  69. .tui-banner-swiper {
  70. width: 700rpx;
  71. margin: 0 auto;
  72. height: 340rpx;
  73. border-radius: 24rpx;
  74. overflow: hidden;
  75. transform: translateY(0);
  76. box-shadow:0px 3px 6px rgba(225,86,22,0.08);
  77. margin-top: 16rpx;
  78. .banner-item{
  79. border-radius: 24rpx;
  80. }
  81. .tui-slide-image {
  82. width: 100%;
  83. height: 340rpx;
  84. display: block;
  85. }
  86. }
  87. .swiper__dots-box{
  88. position: absolute;
  89. bottom: 30rpx;
  90. left: 0;
  91. right: 0;
  92. /* #ifndef APP-NVUE */
  93. display: flex;
  94. /* #endif */
  95. flex: 1;
  96. flex-direction: row;
  97. justify-content: center;
  98. align-items: center;
  99. .swiper__dots-item{
  100. width: 8rpx;
  101. height: 8rpx;
  102. border-radius: 100%;
  103. margin-left: 6px;
  104. background-color:rgba(255,255,255,.7);
  105. }
  106. .swiper__dots-long{
  107. width: 35rpx;
  108. height: 8rpx;
  109. border-radius: 4rpx;
  110. background-color: #ffff;
  111. transition: all 0.4s;
  112. }
  113. }
  114. .swiper-banner-msg{
  115. width: 100%;
  116. height: 54rpx;
  117. box-sizing: border-box;
  118. padding: 0 24rpx;
  119. margin-top: 20rpx;
  120. .content{
  121. width: 100%;
  122. height: 54rpx;
  123. box-sizing: border-box;
  124. padding: 0 34rpx;
  125. background-color: #fff0e9;
  126. border-radius: 16rpx;
  127. .item{
  128. width: 33.33%;
  129. height: 54rpx;
  130. line-height: 54rpx;
  131. font-size: $font-size-24;
  132. color: $color-system;
  133. float: left;
  134. &.le{
  135. text-align: left;
  136. }
  137. &.ce{
  138. text-align: center;
  139. }
  140. &.ri{
  141. text-align: right;
  142. }
  143. .iconfont{
  144. color: $color-system;
  145. font-size: $font-size-32;
  146. .sm{
  147. font-size: $font-size-26;
  148. }
  149. }
  150. }
  151. }
  152. }
  153. </style>