banner.vue 3.4 KB

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