<!--index.wxml-->
<wxs src="../../app.wxs" module='tool' />
<wxs src="index.wxs" module='Index' />
<view class="container {{!transition&&'container-transition'}}" style="top:{{transition?'0':Index.getTop(scrollTop, per)}}rpx;" hidden="{{show}}">

  <!-- 轮播及条件筛选开始 -->
  <view class="block">
    <!-- 页面标题 -->
    <!-- <view class="block-title" bindtap="toPerson">
      <text>需求大厅</text>
      <image src="/images/icon/person.png"></image>
    </view> -->
    <!-- 页面标题结束 -->
    <view class="swiper-group">
      <swiper class="swiper" indicator-color='#fff' indicator-active-color="#fff" autoplay='{{autoplay}}'
        circular='{{circular}}' interval='{{interval}}' duration='{{duration}}' bindchange="swiperChange">
        <swiper-item wx:for='{{swiper}}' wx:key="index">
          <image src="{{item}}"></image>
        </swiper-item>
      </swiper>
      <!-- <view class="dot">
        <view class="dot-list {{swiperIndex === index?'dot-list-activated':''}}" wx:for='{{swiper}}' wx:key="index">
        </view>
      </view> -->
    </view>

    <!-- 条件筛选开始 -->
    <view class="choose-area-content {{fixTop < scrollTop?'fixed':''}}">
      <view class="choose-area">
        <view class="condition">
          <view bindtap="openArea">
            <text class="condition-content">{{district}}</text>
            <image src="/images/icon/up.png"></image>
          </view>
        </view>
        <view class="condition">
          <view data-condition="industry" bindtap="chooseCondition">
            <text class="condition-content {{condition==='industry'&&'color'}}">{{industry}}</text>
            <image src="{{condition==='industry'?'/images/icon/down.png':'/images/icon/up.png'}}"></image>
          </view>

          <view style="margin-left:15rpx;" data-condition="price" bindtap="chooseCondition">
            <text class="condition-content {{condition==='price'&&'color'}}">{{price}}</text>
            <image src="{{condition==='price'?'/images/icon/down.png':'/images/icon/up.png'}}"></image>
          </view>
        </view>
      </view>
      <view class="industry-list" hidden="{{condition!=='industry'}}">
        <view class="industry-list-item  {{index===industry_index?'condition-list-item-action':''}}"
          wx:for='{{industryList}}' wx:key="index" bindtap="choose" data-index="{{index}}" data-id="{{item.id}}">
          {{item.name}}</view>
      </view>
      <view class="price-list" hidden="{{condition!=='price'}}">
        <view class="price-list-item  {{index===price_index?'condition-list-item-action':''}}" wx:for='{{priceList}}'
          wx:key="index" bindtap="choose" data-index="{{index}}" data-id="{{item.id}}">{{item.name}}</view>
      </view>
    </view>

    <!-- 条件筛选结束 -->
  </view>
  <!-- 轮播及条件筛选结束 -->

  <!-- 需求列表开始 -->
  <view class="list {{fixTop < scrollTop?'margin':''}} ">
    <block wx:for='{{list}}' wx:key="index">
      <view class="list-item" wx:for='{{item}}' wx:key="index" data-id="{{item.id}}" bindtap="toDetail">
        <!-- <view class="top">
          <view class="name global-family">{{item.name}}</view>
          <text class="payment">
          <text>{{item.price}}元</text>
          <text wx:if='{{item.settlementMethod===1 }}'>*{{item.stage || 0}}期</text>
          <text wx:if='{{item.settlementMethod===0 }}'>*1次</text>
          </text>
        </view>
        <view class="midden">
          <text class="company">{{item.companyName}}</text>
          <text class="time">{{tool.formatTime(item.createTime,'.','',true)}}</text>
        </view>
        <view class="bottom">
          <view class="bottom-item">
            <image src="/images/icon/address.png"></image>
            <text>{{item.provinceCityCountry}}</text>
          </view>
          <view class="bottom-item">
            <image src="/images/icon/job.png"></image>
            <text>任务数：{{item.number || '若干'}}</text>
          </view>
        </view>
        <image src="/images/icon/yibaoming.png" class="icon" wx:if='{{item.isEnrollment}}'></image> -->
        <view class="list-item-header">
          <view class="list-item-header-name">
            {{item.name}}
          </view>
          <view class="list-item-header-price">{{item.price}}元</view>
        </view>
        <view class="list-item-info">
          <view class="company-info">{{item.companyName}}</view>
          <view class="company-time">{{tool.formatTime(item.createTime,'.','',true)}}</view>
        </view>
        <view class="position-info">
          <view class="address">
            <image src="../../imgs/address.png" class="address-image"></image>
            <text>{{item.provinceCityCountry}}</text>
          </view>
          <view class="number">
            <image src="../../imgs/number.png" class="number-image"></image>
            <text>任务数: {{item.number || '若干'}}</text>
          </view>
        </view>
        <image src="../../imgs/yibaoming.png" class="icon" wx:if='{{item.status === 5}}'></image>
      </view>
    </block>

    <view class="offline" wx:if='{{offline}}'>
      <view class="offline-content">
        <image src="/images/icon/offline.png"></image>
        <text>没有网络连接</text>
        <view class="offline-btn" bindtap="reload">重新加载</view>
      </view>
    </view>
    <view class="loading" wx:if='{{loading}}'>
      <view class="offline-content loading-content">
        <image src="/images/icon/loading.png"></image>
        <text>加载中</text>
      </view>
    </view>
    <view class="list-length" wx:if='{{list_length}}'>
      <view class="offline-content list-length-content">
        <image src="/images/icon/empty.png"></image>
        <text>暂无需求</text>
      </view>
    </view>
  </view>
  <!-- 需求列表结束 -->
  <view class="tab-bar" wx:if="{{list.length}}"></view>
</view>

<!-- 蒙层  地区选择开始 -->
<view class="cover" animation='{{cover_animation}}'>
  <select-district bind:colose='coloseDistrict' bind:submit='saveDistrict' />
</view>
<!-- 蒙层  地区选择结束 -->