Commit 7caa86044ec24dcbcb4c8ec977e92622ac73216d

Authored by 后端研发-倪永富
1 parent c2c6f062

首页轮播图默认图片居中

pages/index/index/index.wxml
... ... @@ -30,7 +30,7 @@
30 30 <!--滚动广告-->
31 31 <view class="rel title-img" wx:if="{{banner}}">
32 32 <swiper autoplay="true" class="swiper_box" duration="1000" interval="3000" vertical="" bindchange="bannerSwiperChange" style="height:{{max_sw_height}}rpx">
33   - <swiper-item wx:for="{{banner}}" wx:key="banner">
  33 + <swiper-item wx:for="{{banner}}" wx:key="banner" class="swiperItem">
34 34 <view url="{{item.media_link}}" class="slide-image-frame">
35 35 <image class="slide-image" mode="widthFix" src="{{item.ad_code}}" bindload="imageLoad" data-index="{{index}}" lazy-load="true" binderror="bind_bnerr" data-errorimg="banner[{{index}}].ad_code"></image>
36 36 </view>
... ...
pages/index/index/index.wxss
... ... @@ -65,6 +65,11 @@
65 65 height: auto;
66 66 }
67 67  
  68 +.swiperItem {
  69 + display: flex;
  70 + align-items: center;
  71 +}
  72 +
68 73 .s_prom {
69 74 width: 100%;
70 75 height: 340rpx;
... ...