search.wxml 4.1 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="getSearch" 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="goSearch">搜索</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='{{list}}' wx:for-index='mindex' wx:key>
      <view class='left_box'>
        <view class='head_portrait'>
          <image src='{{item.avatar}}'></image>
        </view>
      </view>
      <view class='item_list'>
        <view class='list_head_box'>
          <view class='user_name'>{{item.user_nickname}}</view>
          <view class=' state_box'>
            <view class="collect_box {{item.user_host==1?'active':''}}" catchtap='attention' data-index="{{mindex}}" data-id='{{item.open_user_id}}'>
              <text class="collect_word">关注TA</text>
            </view>
          </view>
        </view>
        <view catchtap='goDetail' data-id='{{item.id}}' data-index="{{index}}">
          <view class='list_content'>{{item.title}}</view>
          <view class='list_img_box'>
            <block wx:for='{{item.img}}' wx:for-item='items' wx:key='' wx:for-index='sindex'>
              <image src='{{items.img}}' catchtap='viewImg' data-src='{{items.img}}' data-text='{{items.text}}' data-mindex="{{mindex}}" data-sindex='{{sindex}}'></image>
            </block>
          </view>
          <view class='list_content'>{{item.text}}</view>
        </view>
        <view class='list_state_box'>
          <view class='time'>{{item.open_time}}</view>
          <view class='list_icon'>
            <view catchtap='likeCharge' data-index="{{mindex}}" data-id='{{item.id}}'>
              <text class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></text>
              <text class='iconfont icon-huida pinglun1' wx:else></text>
              <text class=''>{{item.support}}</text>
            </view>
            <view catchtap='review' data-id='{{item.id}}' data-type='review'>
              <text class='iconfont icon-pinglun pinglun1'></text>
              <text>{{item.table_num}}</text>
            </view>
            <view catchtap='collectInfo' data-index="{{mindex}}" data-id='{{item.id}}'>
              <text class='iconfont icon-shoucang2 zan' wx:if='{{item.user_collect==1}}'></text>
              <text class='iconfont icon-shoucang4 pinglun1' wx:else></text>
              <text class=''>{{item.collect}}</text>
            </view>
            <view class='more_box'>
              <text class='iconfont icon-gengduo' catchtap='showMore' data-index='{{mindex}}'></text>
              <view class='more_label_box' wx:if='{{item.more_state}}'>
                <view class='more_item' catchtap='showPoster' data-id="{{item.id}}">
                  <text class='iconfont icon-haibao more'></text>
                  <text>生成分享海报</text>
                </view>
                <view class='more_line'></view>
                <view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'>
                  <text class='iconfont icon-jubao more'></text>
                  <text>投诉举报</text>
                </view>
              </view>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</view>