<!--pages/search-result/search-result.wxml-->
<wxs src="../tools.wxs" module="globalTools" />
<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="item-hover">
      <!-- 兼职岗位 -->
      <block wx:if="{{item.hpPosition.position.positionCategory == 1 || item.hpPosition.position.positionCategory == 9}}">
        <view class='box-item-info'>
          <view class='one'>
            <view class='left'>
              {{item.hpPosition.position.positionName}}
            </view>
            <view class='salary'>
              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
              {{item.hpPosition.position.salary}}
            </view>
          </view>
          <view class='two'>
            <view class='limit'>
              <view>
                <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
              </view>
              <view>
                <block wx:if="{{item.hpPosition.position.workDay}}">
                  <block wx:for="{{globalTools.splitStr1(item.hpPosition.position.workDay,',')}}" wx:key="*this" wx:for-item="tag">
                    <block wx:if="{{index == 0}}">
                      {{tag}} ~
                    </block>
                    <block wx:if="{{index == (globalTools.splitStr1(item.hpPosition.position.workDay,',').length-1)}}">
                      {{tag}}
                    </block>
                  </block>
                  <text>(共计{{globalTools.splitStr1(item.hpPosition.position.workDay,',').length}}天)</text>
                </block>
              </view>
            </view>
            <block wx:if="{{item.hpPosition.position.settlementMethod}}">
              <view class='time'>{{item.hpPosition.position.settlementMethod}}</view>
            </block>
            <block wx:else>
              <view></view>
            </block>
          </view>
          <view class='three'>
            <view class='area'>
              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
              <block wx:if="{{item.hpPosition.position.hpPositionAddressList.length>0}}">
                <text class='area-name'>{{item.hpPosition.position.hpPositionAddressList[0].adname}}</text>
              </block>
              <block wx:else>
                全国
              </block>
            </view>
            <view class='time'>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
              <text>{{globalTools.subStr(item.inviteTime)}}</text>
            </view>
          </view>
        </view>
      </block>
      <!-- 拼团 -->
      <block wx:elif="{{item.hpPosition.position.positionCategory == 4}}">
        <view class='box-item-info'>
          <view class='one'>
            <view class='left'>
              {{item.hpPosition.position.positionName}}
            </view>
            <view class='salary'>
              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
              {{item.totalSalary?item.hpPosition.position.totalSalary:item.hpPosition.position.basicSalary}}
            </view>
          </view>
          <view class='four'>
            <view class='commpany'>{{item.hpPosition.position.hpCompany.companyName}}</view>
            <view class='area'>
              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
              <text class='area-name'>{{item.hpPosition.position.hpPositionAddressList[0].adname}}</text>
            </view>
          </view>
          <view class='two'>
            <view class='limit_1'>
              <block wx:if="{{item.hpPosition.position.specialWelfare}}">
                <i-tag wx:for="{{globalTools.splitStr1(item.hpPosition.position.specialWelfare,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
                  {{tag}}
                </i-tag>
              </block>
              <block wx:if="{{item.hpPosition.position.accommodation}}">
                <i-tag i-class="tag-class">
                  {{item.hpPosition.position.accommodation}}
                </i-tag>
              </block>
              <block wx:if="{{item.hpPosition.position.socialSecurity}}">
                <i-tag i-class="tag-class">
                  {{item.hpPosition.position.socialSecurity}}
                </i-tag>
              </block>
              <block wx:if="{{item.hpPosition.position.workDinner}}">
                <i-tag i-class="tag-class">
                  {{item.hpPosition.position.workDinner}}
                </i-tag>
              </block>
              <block wx:if="{{item.hpPosition.position.regularBus}}">
                <i-tag i-class="tag-class">
                  {{item.hpPosition.position.regularBus}}
                </i-tag>
              </block>
            </view>
            <view></view>
          </view>
          <view class='three'>
            <view class='fan' wx:if="{{item.hpPosition.position.reward}}">
              <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image>
              <text>入职最高奖励 {{item.hpPosition.position.reward}}元</text>
            </view>
            <view wx:else>
            </view>
            <view class='time'>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
              <text>{{globalTools.subStr(item.hpPosition.position.updateDate)}}</text>
            </view>
          </view>
          <view class='five'>
            <view class="pt-member">已有
              <text class="number">{{item.hpPosition.position.startGroupNumber}}</text> 位伙伴加入了该拼工
            </view>
            <view class="endtime">结束时间：{{globalTools.formateDay(item.hpPosition.position.groupEndTime)}}</view>
          </view>
        </view>
      </block>
      <!-- 福利岗位 -->
      <block wx:elif="{{item.hpPosition.position.positionCategory == 5}}">
        <view class='box-item-info'>
          <view class='one'>
            <view class='left'>
              {{item.hpPosition.position.positionName}}
            </view>
            <view class='salary'>
              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
              {{item.hpPosition.position.salary}}
            </view>
          </view>
          <view class='two'>
            <view class='limit'>
              <view>
                <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
              </view>
              <text> {{globalTools.subStr(item.hpPosition.position.publishTime)}} ~ {{globalTools.subStr(item.hpPosition.position.endTime)}}</text>
            </view>
            <view class='time'>{{item.hpPosition.position.settlementMethod}}</view>
          </view>
          <view class='three'>
            <view class='area'>
              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
              <block wx:if="{{item.hpPosition.position.activityWide}}">
                <i-tag wx:for="{{globalTools.splitStr1(item.hpPosition.position.activityWide,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class1" style="margin-left:10rpx;">
                  {{tag}}
                </i-tag>
              </block>
            </view>
            <view class='time'>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
              <text>{{globalTools.subStr(item.inviteTime)}}</text>
            </view>
          </view>
        </view>
      </block>
      <!-- 全职，入职奖励，高薪急聘 -->
      <block wx:else>
        <view class='box-item-info'>
          <view class='one'>
            <view class='left'>
              {{item.hpPosition.position.positionName}}
            </view>
            <view class='salary'>
              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
              {{item.totalSalary?item.hpPosition.position.totalSalary:item.hpPosition.position.basicSalary}}
            </view>
          </view>
          <view class='four'>
            <view class='commpany'>{{item.hpPosition.position.hpCompany.companyName}}</view>
            <view class='area'>
              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
              <block wx:if="{{item.hpPosition.position.hpPositionAddressList.length>0}}">
                <text class='area-name'>{{item.hpPosition.position.hpPositionAddressList[0].adname}}</text>
              </block>
              <block wx:else>
                全国
              </block>
            </view>
          </view>
          <view class='two'>
            <view class='limit_1'>
              <block wx:if="{{item.hpPosition.position.specialWelfare}}">
                <i-tag wx:for="{{globalTools.splitStr1(item.hpPosition.position.specialWelfare,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
                  {{tag}}
                </i-tag>
              </block>
              <block wx:if="{{item.hpPosition.position.accommodation}}">
                <i-tag i-class="tag-class">
                  {{item.hpPosition.position.accommodation}}
                </i-tag>
              </block>
              <block wx:if="{{item.hpPosition.position.socialSecurity}}">
                <i-tag i-class="tag-class">
                  {{item.hpPosition.position.socialSecurity}}
                </i-tag>
              </block>
              <block wx:if="{{item.hpPosition.position.workDinner}}">
                <i-tag i-class="tag-class">
                  {{item.hpPosition.position.workDinner}}
                </i-tag>
              </block>
              <block wx:if="{{item.hpPosition.position.regularBus}}">
                <i-tag i-class="tag-class">
                  {{item.hpPosition.position.regularBus}}
                </i-tag>
              </block>
            </view>
            <view></view>
          </view>
          <view class='three'>
            <block wx:if="{{item.positionCategory == 3}}">
              <view class='fan' wx:if="{{item.hpPosition.position.reward}}">
                <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image>
                <text>入职最高奖励 {{item.hpPosition.position.reward}}+{{item.hpPosition.position.platformAllowance}}元</text>
              </view>
              <view wx:else>
              </view>
            </block>
            <block wx:else>
              <view class='fan' wx:if="{{item.hpPosition.position.reward}}">
                <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image>
                <text>入职最高奖励 {{item.hpPosition.position.reward}}元</text>
              </view>
              <view wx:else>
              </view>
            </block>
            <view class='time'>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
              <text>{{globalTools.subStr(item.inviteTime)}}</text>
            </view>
          </view>
        </view>
      </block>
    </view>
  </view>
  <view class="loading_no" hidden='{{isScroll}}'>{{showNoMore}}</view>
</block>
<block wx:else>
  <view class='no_data'>
    <image src="{{imgServerUrl}}/images/happyjob/no_data.png" class="white" />
    <view class='no_text'>暂无邀请您面试的职位</view>
  </view>
</block>