<!--pages/search-result/search-result.wxml-->
<wxs src="../tools.wxs" module="globalTools" />
<wxs src="../index/index.wxs" module="Tools" />
<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">
      <!-- 兼职岗位 -->
      <block wx:if="{{item.positionCategory == 1 || item.positionCategory == 9}}">
        <view class='box-item-info'>
          <view class='one'>
            <view class='left'>
              {{item.positionName}}
            </view>
            <view class='salary'>
              {{item.salary}}
            </view>
          </view>
          <view class='two' id="two_{{index}}">
            <view class='limit'>
              <!-- <view>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
            </view> -->
              <view>
                <block wx:if="{{item.workDay}}">
                  <block wx:for="{{globalTools.splitStr1(item.workDay,',')}}" wx:key="*this" wx:for-item="tag">
                    <block wx:if="{{index == 0}}">
                      {{globalTools.formatDate(tag)}} 至
                    </block>
                    <block wx:if="{{index == (globalTools.splitStr1(item.workDay,',').length-1)}}">
                      {{globalTools.formatDate(tag)}}
                    </block>
                  </block>
                  <text> (共计{{globalTools.splitStr1(item.workDay,',').length}}天)</text>
                </block>
              </view>
            </view>
            <view class='time'>
              <text>{{Tools.formatTime(item.updateDate)}}</text>
            </view>
          </view>
          <view class="address">
            <text>{{item.hpPositionAddressList[0].adname}}</text>
          </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" 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 class='three'>
          <view class='area' wx:if="{{item.hpPositionAddressList}}">
            <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
            <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
          </view>
          <view wx:else>
          </view>
          <view class='time'>
            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
            <text>{{Tools.formatTime(item.updateDate)}}</text>
          </view>
        </view> -->
        </view>
      </block>
      <!-- 拼团 -->
      <block wx:elif="{{item.positionCategory == 4}}">
        <view class='box-item-info'>
          <view class='one'>
            <view class='left'>
              {{item.positionName}}
            </view>
            <view class='salary'>
              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
              {{item.totalSalary?item.totalSalary:item.basicSalary}}
            </view>
          </view>
          <view class='four'>
            <view class='commpany'>{{item.hpCompany.companyName}}</view>
          </view>
          <view class='address'>
            <!-- <image src='{{imgServerUrl}}/images/happyjob/address.png'></image> -->
            <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
          </view>
          <view class='two'>
            <view class='limit_1'>
              <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':''}}" data-index='{{index}}' catchtap="doArrow" 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 class='three'>
            <view class='fan' wx:if="{{item.reward}}">
              <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
              <text>入职最高奖励 {{item.reward}}元</text>
            </view>
            <view wx:else>
            </view>
            <!-- <view class='time'>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
              <text>{{globalTools.subStr(item.updateDate)}}</text>
            </view> -->
          </view>
          <view class='five'>
            <view class="pt-member">已有
              <text class="number">{{item.startGroupNumber}}</text> 位伙伴加入了该拼工
            </view>
            <view class="endtime">结束时间：{{globalTools.formateDay(item.groupEndTime)}}</view>
          </view>
        </view>
      </block>
      <!-- 福利岗位 -->
      <block wx:elif="{{item.positionCategory == 5}}">
        <view class='box-item-info'>
          <view class='one'>
            <view class='left'>
              {{item.positionName}}
            </view>
            <view class='salary'>
              {{item.salary}}
            </view>
          </view>
          <view class='two'>
            <view class='limit'>
              <!-- <view>
              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
            </view> -->
              <text> {{globalTools.formatDate(item.publishTime)}} 至 {{globalTools.formatDate(item.endTime)}}</text>
            </view>
            <view class='time'>{{Tools.formatTime(item.updateDate)}}</view>
          </view>
          <view class="address">
            <text>{{item.hpPositionAddressList[0].adname}}</text>
          </view>
          <view class='two {{item.up?"down":""}}' id="two_{{index}}">
            <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':''}}" data-index='{{index}}' catchtap="doArrow" 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 class='three'>
            <!-- <view class='area'>
            <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
            <block wx:if="{{item.activityWide}}">
              <i-tag wx:for="{{globalTools.splitStr1(item.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.updateDate)}}</text>
          </view> -->
          </view>
        </view>
      </block>
      <!-- 全职，入职奖励，高薪急聘 -->
      <block wx:else>
        <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[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":""}}' id="two_{{index}}">
            <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>
      </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>