tanyanfei 4 tahun lalu
induk
melakukan
8614e5fd51
2 mengubah file dengan 20 tambahan dan 2 penghapusan
  1. 17 2
      pages/hotel/hotel.wxml
  2. 3 0
      pages/hotel/hotel.wxss

+ 17 - 2
pages/hotel/hotel.wxml

@@ -1,5 +1,12 @@
 <!--pages/hotel/hotel.wxml-->
-  <image style="width:100%;" mode="widthFix" src="{{info.img}}"></image>
+<swiper indicator-dots="{{true}}">
+        <block wx:for="{{info.imgs}}" wx:key="*this">
+          <swiper-item>
+            <image style="width:100%;height:100%;"  src="{{item}}"></image>
+          </swiper-item>
+        </block>
+</swiper>
+  
 <view class="top">
   <view class="tt">{{info.name}}</view>
   <text>地址:{{info.address}}</text>
@@ -9,6 +16,7 @@
 <view class="content">
     <view class="list" wx:for='{{info.rooms}}'>
         <image src="{{item.img}}"></image>
+        
         <view>
             <view class="title">{{item.name}}</view>
             <text style="color:#999;">{{item.room_area}}m²   {{item.food_condition}}   {{item.floor}}层   {{item.enable_number}}人入住    </text>
@@ -25,7 +33,14 @@
   <view class="room">  
       <icon bindtap="close" class="icon-small" type="cancel" size="23"></icon>
       <text class="room_title">{{data.name}}</text>
-      <image src="{{data.img}}"></image>
+      <!-- <image src="{{data.img}}"></image> -->
+      <swiper indicator-dots="{{true}}">
+                <block wx:for="{{data.imgs}}" wx:key="*this">
+                  <swiper-item>
+                    <image style="width:100%;height:100%;"  src="{{item}}"></image>
+                  </swiper-item>
+                </block>
+      </swiper>
       <view class="room_item">
           房型信息
           <view><text>房型:{{data.room_type}}</text><text>面积:{{data.room_area}}m²</text></view>

+ 3 - 0
pages/hotel/hotel.wxss

@@ -2,6 +2,9 @@
 page{
   padding: 0;
 }
+swiper{
+  height: 200px;
+}
 .content{
   height: auto;
 }