<!--pages/search/index.wxml-->
<!-- <view class="header">
  <view class='search'>
    <view class='i_search'>
      <image src='{{imgServerUrl}}/images/happyjob/search.png'></image>
    </view>
    <input class='search-input' type='text' confirm-type="search" value="{{searchVal}}" bindinput='bindKeyInput' bindconfirm="toSearchPage" placeholder="请输入您要找的职位、企业名" auto-focus/>
  </view>
  <view class='cancel' bindtap='toSearchPage'>搜索</view>
</view> -->
<view class='app-header'>
  <view class='map' bindtap='toCity'>
    <view class='location'>
      <image src='/images/happyjob/index_position.png'></image>
    </view>
    <text class='cityname'>{{cityName}}</text>
    <!-- <i-icon class="arrow-down" type="play_fill" /> -->
  </view>
  <view class='search' bindtap='toSearch'>
    <view class="search-content">
      <view class='i_search'>
        <image src='{{imgServerUrl}}/images/happyjob/search.png'></image>
      </view>
      <input class='search-input' focus="{{true}}" type='text' confirm-type="search" value="{{searchVal}}" bindinput='bindKeyInput' bindconfirm="toSearchPage" placeholder="搜索你想要的好岗位"></input>
    </view>
    <view class="btn-search" bindtap='toSearchPage'>搜索</view>
  </view>
</view>
<view class='history topic'>
  <view class='topic-header' wx:if='{{searchKey.length}}'>
    <view class='history-title'>历史记录：</view>
    <view>
      <image src='/images/happyjob/search_clear.png' bindtap='delHistory'></image>
    </view>
  </view>
  <view class='record-list'>
    <view class='record' wx:for="{{searchKey}}" wx:key="{{item.id}}" data-id="{{item.id}}" data-value="{{item.searchVal}}" bindtap='selectMsg' bindlongpress="delHistory">{{item.searchVal}}</view>
  </view>
</view>

<view class='history topic'>
  <view class='topic-header'>
    <view class='history-title'>热门搜索：</view>
    <view></view>
  </view>
  <view class='record-list'>
    <view class='record' wx:for="{{hotSearch}}" wx:key="{{item.id}}" data-id="{{item.id}}" data-value="{{item.searchVal}}" bindtap='selectMsg' bindlongpress="delHistory">{{item.searchVal}}</view>
  </view>
</view>