<!--pages/searchResults/searchResults.wxml-->
<navBar></navBar>
<van-notify id="van-notify" />
<myFloatButton count="{{patentNoList.length}}" bind:click="clickButton"></myFloatButton>
<!-- <myDialog isShown="{{showDialog}}" title="选择关注的类型" bindcancel="closeDialog" bindconfirm="confirm">
  <view>
    <view class="grids"  bordered="{{ false }}">
        <view class="grid {{followType == 1?'checked':''}}" data-type="1" catch:tap="attention">
          <view class="iconfont myIconanquanbangzhu operate_icon"></view>
          <view class="operate_text">白名单</view>
        </view>
        <view class="line"></view>
        <view class="grid {{followType == 2?'checked':''}}" data-type="2"  catch:tap="attention">
          <view class="iconfont myIconicon-test  operate_icon"></view>
          <view class="operate_text">灰名单</view>
        </view>
        <view class="line"></view>
        <view class="grid {{followType == 0?'checked':''}}" data-type="0" catch:tap="attention">
          <view class="iconfont myIcongroup43 operate_icon"></view>
          <view class="operate_text">黑名单</view>
        </view>
      </view>
      <view class="isAdd">
        <van-checkbox value="{{ isAdd }}" bind:change="changeIsAdd">选择的专利是否收藏到对应产品当中</van-checkbox>
      </view>
  </view>
</myDialog> -->

<followPopup show="{{showDialog}}" showCollect="{{true}}" changeFollow="{{changeFollow}}" bindonClose="closeDialog" bindattention="confirm" bindcancelFollow="cancelFollow"></followPopup>

<myDialog isShown="{{showDialog2}}" title="数据的检索范围" showFoot="{{false}}" bindcancel="closeDialog2">
  <view class="dialog2" wx:for="{{dataRangeRecord}}">
    <view class="dialog2_title">{{item.name}}</view>
    <view class="dialog2_value">({{item.startTime}}到{{item.endTime}})</view>
  </view>
</myDialog>

<wux-fab-button
  position="bottomRight"
  theme="balanced"
  direction="vertical"
  reverse="{{false}}"
  spaceBetween="{{ 10 }}"
  sAngle="{{ 0 }}"
  eAngle="{{ 360 }}"
  buttons="{{ buttons }}"
  bind:change="onChange"
  bind:click="onClick"
  bind:contact="onContact"
  bind:getuserinfo="onGotUserInfo"
/>
<my-scroll-view triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore"  customStyle="height: calc(100vh - 200rpx)">
<view class="searchResults">
  <view class="head">
    <!-- <view class="img">
      <image class="img" src="/static/image/logo-3.png" mode=""/>
    </view> -->
    <view>
      <myInput value="{{keyword}}" filePath="{{product.filePath}}" ownner="{{false}}" placeholder="请输入产品相关关键词" bindinput="changeKeyword" bindchangeSearchType="changeSearchType" bindsearch="search"></myInput>
    </view>
  </view>
  <view class="product">
    <view class="product_head">
      <view class="product_text" bind:tap="toURL"> 
        <wux-ellipsis wx:if="{{product.name}}"  wux-class="ellipsis" class="head_left_title"  direction="end" content="产品名称：{{ product.name }}"/>
      <!-- <text wx:if="{{product.name}}">产品名称：{{product.name}}</text> -->
      </view>

      <view class="product_icon">
        <view wx:if="{{product.concernType == 0 || product.concernType}}" class="iconfont {{concernType[product.concernType]}}"  catch:tap="cancel"></view>
        <view wx:else class="iconfont myIconguanzhu" bind:tap="open"></view>

        <view wx:if="{{!product.ifMonitor}}" class="iconfont myIconmonitor" catch:tap="control"></view>
        <view wx:else class="iconfont myIcona-yijiankong2x" catch:tap="cancelControl"></view>
      </view>
    </view>
    <view wx:if="{{(searchType == 1 && product.systemFileList && product.systemFileList.length>0)||(searchType == 0 && product.filePath)}}">
      <swiper class="swiper" autoplay="{{false}}" interval="{{3000}}"  duration="{{500}}" indicator-dots="{{false}}">  
        <block wx:if="{{searchType == 1 && product.systemFileList && product.systemFileList.length>0}}">  
          <swiper-item wx:for="{{product.systemFileList}}" wx:for-item="img" wx:key="*this">  
            <!-- <image src="{{imgHttp+img.guid}}" class="slide-image" />   -->
            <!-- <view class="slide-image" style="background-image: url('{{imgHttp+img.guid}}')"></view> -->
            <image src="{{imgHttp+img.guid}}" class="slide-image" mode="aspectFit"/>  
          </swiper-item>  
        </block> 
        <swiper-item wx:elif="{{searchType == 0 && product.filePath}}">
          <image  class="slide-image" src="{{product.filePath}}" mode="aspectFit"/>
          <!-- <view class="slide-image" style="background-image: url('{{product.filePath}}')"></view> -->
        </swiper-item>
        <!-- <swiper-item wx:else>
          <image  class="slide-image" src="/static/image/empty.gif" mode="aspectFit"/>
        </swiper-item> -->
      </swiper>
    </view>
    <view class="product_text" wx:if="{{product.key || product.companyName}}">
        检索内容：{{product.key}}<text wx:if="{{product.key && product.companyName}}">，</text>{{product.companyName}}
      </view>
  </view>
  <van-divider customStyle=" border-color: #6b6b6b;" dashed />
  <view class="content">
    <view class="content_head_result">
        <view class="">
          以下是您的检索结果
          <van-icon name="question" bind:tap="openDialog2"/>
        </view>
    </view>
    <view class="content_head" style="margin-top: 10px;">
      <view class="content_head_description content_head_result_description">注：非会员可选择100条</view>
      <view class="content_head_result content_head_result_description">
        检索到 <span style="color: red;font-weight: bold;">{{total}}</span> 件专利
      </view>
    </view>
    <view class="content_result" wx:if="{{tableData.length>0}}">
      <block wx:for="{{tableData}}" wx:key="index">
        <myCard edit="{{false}}">
          <view slot="head_left">
            <van-tag round color="#3f395c">{{index+ 1}}</van-tag>  专利号：<text class="link" data-patentNo="{{item.patentNo}}" catch:tap="checkPatentDetail">{{item.patentNo}} </text>
          </view>
          <view slot="head_right">
            <van-checkbox-group value="{{ patentNoList }}" data-item="{{item}}" data-index="{{index}}" data-patentNo="{{item.patentNo}}"  bind:change="changePatentNoList">
              <van-checkbox name="{{item.patentNo}}"></van-checkbox>
            </van-checkbox-group>
          </view>
          <view>
            <swiper indicator-dots="{{true}}"
            autoplay="{{false}}" interval="{{2000}}" duration="{{500}}">
            <block wx:if="{{item.imageList && item.imageList.length>0}}" wx:for="{{item.imageList}}" wx:for-item="img" wx:key="index">
              <swiper-item >
                <!-- <view style="background-image: url('{{imgHttp+img.guid}}')" class="slide-image" data-current="{{img}}" data-imgList="{{item.imageList}}" bind:tap="previewImage"></view>   -->
                 <image src="{{imgHttp+img.guid}}" data-current="{{img}}" data-imgList="{{item.imageList}}" bindtap="previewImage" class="slide-image" 	show-menu-by-longpress mode="aspectFit"/>  
              </swiper-item>
            </block>
          </swiper>
          <view wx:if="{{item.title && item.title.length>0}}" class="text">
            <wux-ellipsis defaultExpanded="{{false}}" expandText="展开" collapseText="收起" wux-class="ellipsis" direction="end" content="标题：{{item.title[0].text_content}}"/>
          </view>
          <view wx:if="{{item.rightHolder && item.rightHolder.length>0}}"  class="text">
            专利权人：
            <text wx:for="{{item.rightHolder}}" wx:for-item="rightHolder" wx:for-index="ind" wx:key="ind">
              <text>{{rightHolder.name}}</text>
              <text wx:if="{{ind != item.rightHolder.length-1}}">、</text>
            </text>
          </view>
          </view>
        </myCard>
      </block>
      <!-- <view class="loadData" wx:if="{{total && tableData.length>0}}">
        <view wx:if="{{total>tableData.length}}" bind:tap="loadMore">加载更多</view>
        <wux-spin wux-class="spin" size="small" wx:elif="{{loading}}"/>
        <view wx:else>没有更多了</view>
      </view> -->
    </view>
    <van-empty wx:else description="暂无数据" />
  </view>
</view>
  
</my-scroll-view>