search.wxml 1.9 KB
<view class='page'>
  <view class='banner'>
    <view class='input_box'>
      <view class='input_box_child' bindtap='click'>
        <view class='center' wx:if='{{noClick}}'>
          <image class='false_search_icon' src='/images/search.png'></image>
          <view>搜索您想要的商品</view>
        </view>
        <image class='real_search_icon' src='/images/search.png' wx:if='{{!noClick}}'></image>
        <input type="text" placeholder='{{hothothot}}' placeholder-class='banner_input' value='{{value}}' bindinput='get_keyWords' class='input_placeholder' value="{{word}}"></input>
      </view>
      <view class='iconfont icon-quxiao' bindtap='clear_keyword'></view>
    </view>
    <view class='serach' bindtap='send_search' catchtap="search">搜索</view>
  </view>

  <view class='content_item' wx:if="{{hot_arr.length>0}}">
    <view class='item_list'>
      <view class='title_box'>
        <view class='search_icon'>
          <image src='/images/icon_43.png'></image>
        </view>
        <view class='title'>热门搜索</view>
      </view>
      <view class='recommendation_box'>
        <view class='recommendation_item' wx:for="{{hot_arr}}" wx:key="index" catchtap="add_search" data-name="{{item.name}}">{{item.name}}</view>
      </view>
    </view>

  </view>
  <view class='content_item'>
    <view class='item_list'>
      <view class='title_box' style="justify-content: space-between;align-items: center;">
        <view class='title' style="margin-left: 40rpx;">历史搜索</view>
        <image src='/images/delete.png' wx:if="{{history.length>0}}" catchtap="delete_hitory"/>
      </view>
      <view class='recommendation_box'>
        <view class='recommendation_item' wx:for="{{history}}" wx:key="index" catchtap="add_search" data-name="{{item.search}}">{{item.search}}</view>
      </view>
    </view>
  </view>


  <view class='clear_box' wx:if="{{history.length == 0}}">暂无搜索记录</view>

  <view>

  </view>

</view>