<view class="components">
  <view class="header">
    <view class='applyshop'>{{"适用门店（"+mallNum+"家）"}}</view>
    <!-- <image src="../../assets/itemImg/chevron.png" mode="widthFix" class="rightArrow">
        </image> -->
    <!-- <view class="goShop">{{'共'+mallNum+'家门店适用'}}</view> -->
  </view>
  <view wx:for="{{list}}" wx:for-index="index" wx:key="index" class="body">
    <view class="mall">
      <view>
        <image class="img" src="../../assets/images/merchantImgCover.png"></image>
        <view class="mallItem">
          <view class="title">{{item.mallName}}</view>
        </view>
      </view>

      <!-- 当商户数量不大于三个时 -->
      <view class="goExpand" catchtap="expandList" data-index="{{index}}">
        <view>
          <view class="text">{{item.merchantVoList.length+'家门店适用'}}</view>
          <image wx:if="{{!item.expand}}" src="../../assets/images/chevron.png" mode="widthFix" class="rightArrowDown">
          </image>
          <image wx:else src="../../assets/images/chevron.png" mode="widthFix" class="rightArrowUp"></image>
        </view>
      </view>
    </view>

    <!-- 当item.expand为true且商户数量不大于三个时 -->
    <view class="shop" wx:if="{{item.expand}}">
      <view class='posi' wx:for="{{item.merchantVoList}}" wx:for-index="itemIndex" wx:key="itemIndex">
        <view class='posi_logo'>
          <view bindtap='gotoDetail' data-id='{{item.id}}' data-tenantId='{{item.tenantId}}'>
            <image class="img" src='{{item.merchantImgUrl}}'></image>
          </view>
          <view bindtap='gotoDetail' data-id='{{item.id}}' data-tenantId='{{item.tenantId}}'>
            <view class='name'>{{item.merchantName}}</view>
            <view class='shopVoList'>
              <view wx:for="{{item.shopVoList}}" wx:key="index" wx:for-item="itemName">
                <text class="name">{{itemName.buildingName}}{{itemName.floorName}}--{{itemName.shopNumber}}</text>
                <text class='douhao' wx:if="{{item.shopVoList.length>1}}">,</text>
              </view>
            </view>
          </view>
          <view class="telBox" wx:if="{{item.linkLinePhone}}">
            <image bindtap='phone' data-merchantLinkPhone='{{item.linkLinePhone}}' class="telImg" src="{{teljpgUrl}}" mode="widthFix" />
            <view class="telText">电话</view>
          </view>
          <!-- <view class="certificationBox" wx:if="{{item.latitude&&item.longitude}}" bindtap="goCertification" data-id="{{item.id}}">
            <image class="certificationImg" src="../../assets/images/certification.png" mode="widthFix" />
            <view class="telText">资质</view>
          </view> -->
        </view>
        <view class="siteBox" wx:if="{{item.latitude&&item.longitude}}" bindtap="goMap" data-item="{{item}}">
          <view class="siteText">{{item.addr}}</view>
          <image class="siteImg" src="../../assets/images/siteImg.png" mode="widthFix" />
        </view>
        <view class="dividerInside" wx:if="{{(itemIndex+1)<list[index].merchantVoList.length}}"></view>
      </view>
    </view>
    <view class="divider" wx:if="{{(index+1)<list.length}}"></view>
  </view>
</view>