<!--index.wxml-->
<van-search wx:if="{{list.length!=0}}" bind:change="onChange" bind:search="search" bind:search="onSearch" bindconfirm="search" type="text" shape="round" error="true" shape="round" placeholder="输入搜索关键词" />

<view class="container">

  <!-- 显示公告列表 -->
  <block wx:for="{{vote}}" wx:if="{{!lookserch}}" wx:key="index">
    <view class="rmcontent" bindtap="tovotecontent" data-id="{{item._id}}">
      <image class="conimg" src="{{item.imgSrc}}"></image>
      <view class="con">
        <view>
          <text class="conintro">{{item.votedetail}}</text>
        </view>
        <view class="timeinfo">
          <image src="../../images/时钟.png" class="timeimg"></image>
          <view>{{item.votename}}</view>
          <text class="contime">回收时间：</text>
          <text class="t">{{item.dateTime2}}</text>
        </view>
      </view>
    </view>
  </block>
  <!-- 搜索列表 -->
  <block wx:for="{{listsearch}}" wx:if="{{lookserch}}" wx:key="index">
    <view class="rmcontent" bindtap="tovotecontent" data-id="{{item._id}}">
      <image class="conimg" src="{{item.imgSrc}}"></image>
      <view class="con">
        <view>
          <text class="conintro">{{item.votedetail}}</text>
        </view>
        <view class="timeinfo">
          <image src="../../images/时钟.png" class="timeimg"></image>
          <view>{{item.votename}}</view>
          <text class="contime">回收时间：</text>
          <text class="t">{{item.dateTime2}}</text>
        </view>
      </view>
    </view>
  </block>

  <!-- 没有投票 -->
  <view wx:if="{{vote.length==0}}" style="display: flex;flex-direction: column;align-items: center;margin-top: 350rpx;">
    <image style="width: 120rpx;height: 120rpx;" src="/images/关注.png"></image>
    <view style="color: #7f7f7f;font-size: 9pt;">暂无公告</view>
  </view>
</view>