<!--packageC/o2o/o2oSearchMultiple/o2oSearchMultiple.wxml-->

<view class="search_1">
  <view class="soso uou">
    <view class="search">
      <view class="screenBox">
        <view class="srceenText" bindtap="setScreenShow">
          {{screenMenu[screenIndex].name}} <i class="iconfont icon-member-bottom"></i>
        </view>
        <view class="srceenOptions" wx:if="{{screenShow}}">
          <view class="srceenOptionsItem {{index==screenIndex ? 'active' : ''}}" wx:for="{{screenMenu}}"
            wx:key="{{index}}" data-index="{{index}}" bindtap="setScreenIndex">{{item.name}}</view>
        </view>
      </view>
      <view class="searchBox">
        <input type="text" placeholder="请输入内容" model:value="{{inputs}}" bindconfirm="getListData"/>
        <view class="img-icon" catchtap="getListData">
          <view class="img-icon-btn"></view>
        </view>
      </view>
    </view>
  </view>
</view>


<view wx:if="{{!networkLoading}}" class="loadingimg">
  <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/video-loading.gif" mode='aspectFill' />
</view>

<block wx:if="{{networkLoading && listData.length > 0}}">

  <!-- 商品 -->
  <block wx:if="{{screenType[screenIndex] == 'good'}}">
    <cGoodsList goods='{{listData}}' classifyBol="{{true}}"></cGoodsList>
  </block>

  <!-- 供应商 -->
  <block wx:if="{{screenType[screenIndex] == 'supplier'}}">
    <view class="supplierList">
      <view class="supplierItem" wx:for="{{listData}}" wx:key="id">
        <view class="supplierInfo">
          <view class="face">
            <image src="{{item.has_one_member.avatar}}"></image>
          </view>
          <view class="left-content">
            <view class="name">{{item.username}}</view>
            <view class="desc">在售商品{{item.goods_total}}</view>
          </view>
          <view class="btn" data-id="{{item.supplier_id}}" bindtap="gotoSupplier">进店</view>
        </view>
        <view class="supplierGoods">
          <view class="supplierGood" wx:for="{{item.has_many_goods}}" wx:for-item="good" wx:key="goods_id"
            wx:if="{{index<3}}" data-id="{{good.goods_id}}" bindtap="gotoGoods">
            <block wx:if="{{good.has_one_goods}}">
              <view class="face">
                <image src="{{good.has_one_goods.thumb}}"></image>
              </view>
              <view class="name">{{good.has_one_goods.title}}</view>
              <view class="price">￥{{good.has_one_goods.vip_level_status && good.has_one_goods.vip_level_status.status == 1
                ? good.has_one_goods.vip_level_status.word
                : good.has_one_goods.price}}
              </view>
            </block>
          </view>
        </view>
      </view>
    </view>
  </block>

  <!-- 门店 -->
  <block wx:if="{{screenType[screenIndex] == 'store'}}">
    <cStoreList listStyle="{{openTemplate}}" stores="{{listData}}" noText="{{true}}"></cStoreList>
  </block>

  <!-- 酒店 -->
  <block wx:if="{{screenType[screenIndex] == 'hotel'}}">
    <view style="padding-top:1rem;background:#fff;">
      <hotelList hoteldatas="{{listData}}" show="{{false}}"></hotelList>
    </view>

  </block>


</block>


<view wx:if="{{ networkLoading && listData.length==0}}" class="blank">
  <image src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png' mode='widthFix' />
</view>


<shopfoot></shopfoot>
