<!--index.wxml-->
<view class="container flex-v">
  <view class="flex-item">
    <view class="content">

      <!-- 轮播图 -->
      <view class="banner">
        <view class="imgContent">
          <swiper autoplay="{{true}}" indicator-dots="{{true}}" indicator-color="#83837d" indicator-active-color="#e23838">
            <block wx:for="{{EstateDetail.buildingImg}}" wx:for-item="item" wx:for-index="index" wx:key="key">
              <swiper-item>
                <view class="swiper-item">
                  <image mode="aspectFill" src="{{item.url}}" class="centerLabel cover"></image>
                </view>
              </swiper-item>
            </block>
          </swiper>
        </view>
        <view class="remark">
          <view class="centerLabel">
            <view class="flex-h">
              <text class="name flex-item">{{EstateDetail.buildingName}}</text>
              <text class="price">均价：{{EstateDetail.price}}</text>
            </view>
            <text>别名:{{EstateDetail.name}}</text>
          </view>
        </view>
      </view>

      <!-- 基本信息 -->
      <view class="mainInfo subContent">
        <text class="title">基本信息</text>
        <view class="list">
          <view class="flex-h">
            <text>开盘时间</text>
            <text class="flex-item">{{EstateDetail.openingDate}}</text>
          </view>
          <view class="flex-h">
            <text>项目地址</text>
            <text class="flex-item">{{EstateDetail.address}}</text>
          </view>
          <view class="flex-h">
            <text>物业类型</text>
            <text class="flex-item">{{EstateDetail.propertyType}}</text>
          </view>
          <view class="flex-h">
            <text>最新动态</text>
            <text class="flex-item">{{EstateDetail.dynamic}}</text>
          </view>
        </view>
      </view>

      <!-- 户型 -->
      <view class="roomType subContent">
        <text class="title">户型（{{EstateDetail.buildingApartment.length}}）</text>
        <view class="list">
          <view class="item" wx:for="{{EstateDetail.buildingApartment}}" wx:for-item="item" wx:for-index="idx" wx:key="key">
            <view class="img">
              <image mode="aspectFill" src="{{item.imgUrl}}" class="centerLabel cover"></image>
            </view>
            <view class="info">
              <text>{{item.apartmentName}}</text>
              <text>{{item.remark}}</text>
            </view>
            <text>{{item.marketStatus}}</text>
          </view>
        </view>
      </view>

    </view>
  </view>

  <!-- 底部tab -->
  <view class="foot flex-h" style="padding-bottom: {{ScreenBottomHeight}}rpx">
    <view class="flex-item" style="background: #bb9c79;" bindtap="MakeAnAppointment">
      <image mode="widthFix" src="/assets/images/icon23.png" style="width: 34rpx;"></image>
      <text style="color: #fff;">预约看房</text>
    </view>
    <view class="flex-item">
      <image mode="widthFix" wx:if="{{!EstateDetail.IsCollect}}" src="/assets/images/icon25.png" style="width: 34rpx;"></image>
      <image mode="widthFix" wx:if="{{EstateDetail.IsCollect}}" src="/assets/images/icon26.png" style="width: 34rpx;"></image>
      <text>{{EstateDetail.IsCollect ? '已收藏' : '收藏楼盘'}}</text>
    </view>
    <view class="flex-item" bindtap="OpenPhone">
      <image mode="widthFix" src="/assets/images/icon24.png" style="width: 34rpx;"></image>
      <text>电话咨询</text>
    </view>
  </view>

</view>