search.wxml 3.7 KB
<!--pages/service/renting/search/search.wxml-->
<view class="container">
  <view class="head_search_box">
    <view class="input">
      <view class='iconfont icon-search fangdajing'></view>
      <input placeholder='请输入搜索相关内容' bindinput="inputKey" value="{{searchValue}}" bindconfirm="startSearch" placeholder-class='input_size' class='search_input' />
      <view class="iconfont icon-jia1 jia1" catchtap="clearInput"></view>
    </view>
    <view class="search-text" bindtap="startSearch">搜索</view>
  </view>

  <view class="history_box">
    <view class="head">
      <view class="title">搜索历史</view>
      <view class="clear" bindtap="clearHistory">
        <view class="iconfont icon-shanchu"></view>
        <text>清空历史</text>
      </view>
    </view>

    <view class="history_list {{searchHistory.length === 0?'text-center':''}}">
      <!-- <text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text> -->
      <view wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item}}</view>
    </view>
  </view>

  <!--文章内容-->
  <view class='content_box'>
    <view class='content_item' wx:for='{{[1,2]}}' wx:key>
      <view class='left_box'>
        <view class='head_portrait' catchtap='showModal' data-index="{{index}}">
          <image src='/images/head.png'></image>
        </view>
      </view>
      <view class='item_list'>
        <view class='list_head_box'>
          <view class='user_name' catchtap='showModal' data-index="{{index}}">名字</view>
          <view class='state_box'>
            <block>
              <view class='collect_box active' bindtap='collectInfo' data-index="{{index}}" data-id='{{item.id}}' data-hits='{{item.is_hits}}'>
                <text class='iconfont icon-shoucang0 star2'></text>
                <text class="collect_word">关注TA</text>
              </view>
            </block>
          </view>
        </view>
        <view bindtap='listDetail' data-post_id='{{item.id}}' data-index="{{index}}">
          <view class='list_content'>fsdfdsfdsf</view>
          <view class='list_img_box'>
            <image src='{{items}}' wx:for='{{imgs}}' wx:for-item='items' wx:key='' bindtap='previewImg' data-index="{{index}}"></image>
          </view>
          <view class='list_content'>fsdfdsfdsf</view>
        </view>
        <view class='list_state_box'>
          <view class='time'>2019</view>
          <view class='list_icon'>
            <text bindtap='likeCharge' data-index="{{index}}" data-id='{{item.id}}' data-is_paise='{{item.is_paise}}'>
              <text class='iconfont icon-heart xin1' wx:if="{{!item.is_paise}}"></text>
            <text class='iconfont icon-dianzan- zan'></text>
            <text class=''>0</text>
            </text>
            <text bindtap='review' data-id='{{item.id}}'>
            <text class='iconfont icon-pinglun pinglun1'></text>
            <text>0</text>
            </text>
            <text>
          <text class='iconfont icon-shoucang zan'></text>
            <text class=''>0</text>
            </text>
            <view class='more_box'>
              <text class='iconfont icon-gengduo' bindtap='showMore'></text>
              <view class='more_label_box'  wx:if='{{more_state}}'>
                <view class='more_item'>
                  <text class='iconfont icon-haibao more'></text>
                  <text>生成分享海报</text>
                </view>
                <view class='more_line'></view>
                <view class='more_item' bindtap='complain'>
                  <text class='iconfont icon-jubao more'></text>
                  <text>投诉举报</text>
                </view>
              </view>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</view>