ycm 2 years ago
parent
commit
4e1745c06e
2 changed files with 9 additions and 3 deletions
  1. 8 3
      pages/order/placeOrder/placeOrder.wxml
  2. 1 0
      pages/order/placeOrder/placeOrder.wxss

+ 8 - 3
pages/order/placeOrder/placeOrder.wxml

@@ -34,9 +34,14 @@
 </view>
 
 <view class="scrollBox" id="scrollBox">
-    <scroll-view scroll-x>
-        <image src="{{item.url}}" class="show" wx:for="{{bannerlist}}" wx:key="index"></image>
-    </scroll-view>
+    <!-- <scroll-view scroll-x>
+        <image src="{{item.url}}" class="show" wx:for="{{bannerlist}}" wx:key="index" mode="aspectFill"></image>
+    </scroll-view> -->
+    <swiper class="scrollBox" indicator-dots="true" autoplay="true" interval="2000" duration="{{500}}" indicator-color="rgba(255,255,255,.5)" indicator-active-color="#fff">
+			<swiper-item wx:for="{{bannerlist}}" wx:key="index">
+				<image src="{{item.url}}" class="show" mode="aspectFill"></image>
+			</swiper-item>
+	</swiper>
 </view>
 
 <van-notice-bar wx:for="{{noticelist}}" wx:key="index" mode="closeable" left-icon="/image/icon/message.png" bind:close="closeNews" text="{{item.content}}" h/>

+ 1 - 0
pages/order/placeOrder/placeOrder.wxss

@@ -112,6 +112,7 @@
 
 .scrollBox {
     white-space: nowrap;
+    height: 170rpx;
     /* padding: 32rpx 0; */
     /* padding-left: 32rpx; */
 }