<!-- packageE/stores/stores.wxml -->
<wxs module="util">
  var inOf = function(val, str) { if (val) {return val.indexOf(str) }};
  module.exports.inOf = inOf;
</wxs>
<view class="component-wrapper {{'component-'+component_id}}}">
  <!-- 门店静态 -->
  <view>
    <view id="store" wx:if="{{datas.get_number}}" >
      <view wx:if="{{datas.tab_list && datas.tab_list.length > 0 && !U_tabcontrol}}" style="background:{{datas.tab_bg_color}}">
        <van-tabs active="{{active}}" sticky="{{btnFlag}}" bind:change="onClick" color="{{datas.tab_active_color}}"
          tab-class="tag">
          <block wx:for="{{datas.tab_list}}" wx:key='index'>
            <van-tab wx:if='{{item == "4"}}' name="3" title="附近商家"
              title-style="background:{{datas.tab_bg_color}};overflow: visible;white-space: nowrap;text-overflow: clip;color:{{active==0?datas.tab_active_color:datas.tab_color}};">
              <view class="store-box" >
                <storeItem02 datas="{{datas}}" showMun="{{showMun}}" storeList="{{shopList3}}" wx:if="{{datas.sort_style && datas.sort_style == '2'}}"></storeItem02>
                <storeItem datas="{{datas}}" showMun="{{showMun}}" storeList="{{shopList3}}" wx:else></storeItem>

                <view wx:if="{{shopList3.length <= 0}}" class="loading-box">
                  暂无数据
                </view>
                <view class="loading-box" wx:if="{{isLoadMore3}}" catchtap="getMoreList" >
                  加载更多
                </view>
                <view class="loading-box" wx:if="{{bottomShowBolIndex == index && !isLoadMore3}}">
                  没有更多了~
                </view>
              </view>
            </van-tab>
            <van-tab wx:if='{{item == "1"}}' name="0" title="人气商家"
              title-style="background:{{datas.tab_bg_color}};overflow: visible;white-space: nowrap;text-overflow: clip;color:{{active==0?datas.tab_active_color:datas.tab_color}};">
              <view class="store-box">
                <storeItem02 datas="{{datas}}" showMun="{{showMun}}" storeList="{{shopList0}}" wx:if="{{datas.sort_style && datas.sort_style == '2'}}"></storeItem02>
                <storeItem datas="{{datas}}" showMun="{{showMun}}" storeList="{{shopList0}}" wx:else></storeItem>

                <view wx:if="{{shopList0.length <= 0}}" class="loading-box">
                  暂无数据
                </view>
                <view class="loading-box" wx:if="{{isLoadMore0}}" catchtap="getMoreList" >
                  加载更多
                </view>
                <view class="loading-box" wx:if="{{bottomShowBolIndex == index && !isLoadMore0}}">
                  没有更多了~
                </view>
              </view>
            </van-tab>
            <van-tab wx:if='{{item == "2"}}' title="新入驻商家" name="1"
              title-style="background:{{datas.tab_bg_color}};overflow: visible;white-space: nowrap;text-overflow: clip;color:{{active==1?datas.tab_active_color:datas.tab_color}};">
              <view class="store-box">
                <storeItem02 datas="{{datas}}" showMun="{{showMun}}" storeList="{{shopList1}}" wx:if="{{datas.sort_style && datas.sort_style == '2'}}"></storeItem02>
                <storeItem datas="{{datas}}" showMun="{{showMun}}" storeList="{{shopList1}}" wx:else></storeItem>

                <view wx:if="{{shopList1.length <= 0}}" class="loading-box">
                  暂无数据
                </view>
                <view class="loading-box" wx:if="{{isLoadMore1}}" catchtap="getMoreList" >
                  加载更多
                </view>
                <view class="loading-box" wx:if="{{bottomShowBolIndex == index && !isLoadMore1}}">
                  没有更多了~
                </view>
              </view>

            </van-tab>
            <van-tab wx:if='{{item == "3"}}' title="优惠商家" name="2"
              title-style="background:{{datas.tab_bg_color}};overflow: visible;white-space: nowrap;text-overflow: clip;color:{{active==2?datas.tab_active_color:datas.tab_color}};">
              <view class="store-box">
                <storeItem02 datas="{{datas}}" showMun="{{showMun}}" storeList="{{shopList2}}" wx:if="{{datas.sort_style && datas.sort_style == '2'}}"></storeItem02>
                <storeItem datas="{{datas}}" showMun="{{showMun}}" storeList="{{shopList2}}"  wx:else></storeItem>

                <view wx:if="{{shopList2.length <= 0}}" class="loading-box">
                  暂无数据
                </view>
                <view class="loading-box" wx:if="{{isLoadMore2}}" catchtap="getMoreList" >
                  加载更多
                </view>
                <view class="loading-box" wx:if="{{bottomShowBolIndex == index && !isLoadMore2}}">
                  没有更多了~
                </view>
              </view>

            </van-tab>
          </block>
        </van-tabs>
      </view>

    </view>
  </view>
</view>
