<!--pages/reward/index.wxml-->
<wxs src="../tools.wxs" module="globalTools" />
<!-- 顶部筛选 -->
<view class='head'>
  <view class='map' hover-class="none" bindtap="chooseArea">
    <!-- <view class='location'>
      <image src='{{imgServerUrl}}/images/happyjob/location.png'></image>
    </view> -->
    <text class='cityname'>{{cityName}}</text>
    <image src='{{showAreaList?"/images/happyjob/down.png":"/images/happyjob/up.png"}}'></image>
  </view>
  <view class='salay' bindtap='doSalay'>
    <text class="salayname {{selectId==0?'active':''}}">薪资</text>
    <view class='arrow'>
      <block wx:if="{{selectId == 0}}">
        <block wx:if="{{totalSalary == 2}}">
          <image src='/images/happyjob/sort_down.png'></image>
        </block>
        <block wx:else>
          <image src='/images/happyjob/sort_up.png'></image>
        </block>
      </block>
      <block wx:else>
        <block wx:if="{{totalSalary == 2}}">
          <image src='/images/happyjob/sort_down.png'></image>
        </block>
        <block wx:elif='{{totalSalary == 1}}'>
          <image src='/images/happyjob/sort_up.png'></image>
        </block>
        <block wx:else>
          <image src='/images/happyjob/sort_null.png'></image>
        </block>
      </block>
    </view>
  </view>
  <view class='salay' bindtap='doDistince'>
    <text class="salayname {{selectId==1?'active':''}}">距离</text>
    <view class='arrow'>
      <block wx:if="{{selectId == 1}}">
        <block wx:if="{{sort == 2}}">
          <image src='/images/happyjob/sort_down.png'></image>
        </block>
        <block wx:else>
          <image src='/images/happyjob/sort_up.png'></image>
        </block>
      </block>
      <block wx:else>
        <block wx:if="{{sort == 2}}">
          <image src='/images/happyjob/sort_down.png'></image>
        </block>
        <block wx:elif='{{sort == 1}}'>
          <image src='/images/happyjob/sort_up.png'></image>
        </block>
        <block wx:else>
          <image src='/images/happyjob/sort_null.png'></image>
        </block>
      </block>
    </view>
  </view>
</view>
<block wx:if="{{showAreaList}}">
  <view class='settlementMethod scrolled'>
    <block wx:for="{{areaList}}" wx:key="index" wx:for-item="settle">
      <view class="settleme {{countryCode==settle.countryCode?'active':''}}" data-countryCode="{{settle.countryCode}}" bindtap='settlemethod' data-settle='{{settle.index}}' data-tt='{{index}}'>
        <text>{{settle.countryName}}</text>
      </view>
    </block>
  </view>
</block>
<!-- 列表 -->
<block wx:if="{{list.length !=0 }}">
  <view class='box-body'>
    <view class='box-item' wx:for="{{list}}" wx:key="hpPositionId" bindtap='toDetail' data-id="{{item.id}}" data-cate="{{item.positionCategory}}" hover-class="none">
      <view class='box-item-info'>
        <view class='one'>
          <view class='left'>
            <view wx:if='{{item.positionCategory == 3}}' class="gaoxin">高薪</view>
            <view wx:if='{{item.positionCategory == 4}}' class="pintuan">拼团</view>
            {{item.positionName}}
          </view>
          <view class='salary'>
            {{item.totalSalary?item.totalSalary:item.basicSalary}}
          </view>
        </view>
        <view class='four'>
          <view class='commpany'>{{item.hpCompany.companyName}}</view>
          <view class='area'>
            <!-- <image src='{{imgServerUrl}}/images/happyjob/address.png'></image> -->
            <!-- {{item.hpPositionAddressList[0].adname}} -->
            <text class='area-name'><text>{{Tools.formatTime(item.updateDate)}}</text></text>
          </view>
        </view>
        <view class="address">
          <text>{{item.hpPositionAddressList.length?item.hpPositionAddressList[0].adname:'全国'}}</text>
        </view>
        <view class='three'>
          <block wx:if="{{item.positionCategory == 3}}">
            <view class='fan' wx:if="{{item.reward}}">
              <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
              <text>入职最高奖励 {{item.reward}}元，额外奖励{{item.platformAllowance}}元</text>
            </view>
            <view class='fan' wx:elif="{{item.platformAllowance}}">
              <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
              <text>入职最高奖励 {{item.platformAllowance}}元</text>
            </view>
            <view wx:else>
            </view>
          </block>
          <block wx:else>
            <view class='fan' wx:if="{{item.reward}}">
              <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
              <text>入职最高奖励 {{item.reward}}元</text>
            </view>
            <view wx:else>
            </view>
          </block>
          <!-- <view class='time'>
            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
            <text>{{globalTools.subStr(item.updateDate)}}</text>
          </view> -->
        </view>
        <view class='two {{item.up?"down":""}}'>
          <view class='limit_1'>
            <block wx:if="{{item.settlementMethod}}">
              <i-tag i-class="tag-class">
                {{item.settlementMethod}}
              </i-tag>
            </block>
            <block wx:if="{{item.specialWelfare}}">
              <i-tag wx:for="{{globalTools.splitStr1(item.specialWelfare,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
                {{tag}}
              </i-tag>
            </block>
            <block wx:if="{{item.accommodation}}">
              <i-tag i-class="tag-class">
                {{item.accommodation}}
              </i-tag>
            </block>
            <block wx:if="{{item.socialSecurity}}">
              <i-tag i-class="tag-class">
                {{item.socialSecurity}}
              </i-tag>
            </block>
            <block wx:if="{{item.workDinner}}">
              <i-tag i-class="tag-class">
                {{item.workDinner}}
              </i-tag>
            </block>
            <block wx:if="{{item.regularBus}}">
              <i-tag i-class="tag-class">
                {{item.regularBus}}
              </i-tag>
            </block>
          </view>
          <view class="arrow {{item.up?'down':''}}" catchtap="doArrow" data-index='{{index}}' wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
            <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
            <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
          </view>
        </view>

      </view>
    </view>
  </view>
  <view class="loading_no" hidden='{{isScroll}}'>{{showNoMore}}</view>
</block>
<block wx:else>
  <view class='no_data'>
    <image src="/images/happyjob/position_empty.png" class="white" />
    <view class='no_text'>
      <text>呃哦……什么也没有</text>
      <text class="text">只有一只正在发呆的小白</text>
    </view>
  </view>
</block>