<!--pages/search/search.wxml-->
<nav navName="搜索"></nav>
<wxs src="../../filters/filter.wxs" module="moduleFilter"></wxs>
<view class="page">
  <view class="searchbox">
    <input type="text" value="{{keyword}}" 		bindinput="changeIpt" auto-focus focus placeholder="输入姓名或医院查找医生" bindconfirm="getIptvalue" 	placeholder-class="searchIpt" confirm-type="search" />
    <image src="{{img_host+'/greenss.png'}}" bindtap="goSearch"></image>
  </view>
  <view class="listbox" hidden="{{toggle}}" wx:if="{{hotList.length>0}}">
      <view class="titlebox">
         <view class="name">热门搜索</view>
      </view>
      <view class="listUl" wx:if="{{hotList.length>0}}">
        <view class="cell" wx:for="{{hotList}}" wx:key="index"  bindtap="selectHistroy" data-id="{{item.keyword_name}}">{{item.keyword_name}} </view>
      </view>
    </view>
    <view class="listbox" wx:if="{{seachList.length>0}}" hidden="{{toggle}}" >
      <view class="titlebox">
         <view class="name">搜索历史</view>
         <image src="{{img_host+'/del.png'}}" class="del" bindtap="delSearch"></image>
      </view>
      <view class="listUl">
        <view class="cell" wx:for="{{seachList}}" wx:for-index="idx" wx:key="idx" bindtap="selectHistroy" data-id="{{item}}"> {{item}} </view>
      </view>
    </view>
    <view class="scrollwraper">
    <scroll-view scroll-y style="width: 100%;height:100%" 	lower-threshold="200" bindscrolltolower="lower">
      <view wx:if="{{doctorList.length>0}}" style="margin:0 30rpx">
        <view class="viewcell" bindtap="goExpertDetail" wx:for="{{doctorList}}" wx:key="doctor_id" data-doctorid="{{item.doctor_id}}">
        <view class="left">
          <image src="{{item.avatar}}" mode="aspectFill" wx:if="{{item.avatar}}"></image>
          <image src="{{img_host+'/doctor_avatar.png'}}" wx:else></image>
          <view class="onlinebox" wx:if="{{item.user.is_online==1}}">
           <image src="../../assets/images/online.gif" mode="" class="icon"/>
          </view>
        </view>
        <view class="right">
          <view class="namebox">
            <view class="name">{{item.user_name}}</view>
            <view class="type" wx:if="{{item.hospital.hospital_level_name != '未知'&& item.hospital.hospital_level_name}}">{{item.hospital.hospital_level_name}}</view>
            <view class="type" wx:if="{{item.multi_point_status == 1 && moduleFilter.formatChufang(item.doctor_inquiry_config)}}">可处方</view>
          </view>
          
          <view class="hospital"><text class="doctor_title" wx:if="{{item.doctor_title_name}}">{{item.doctor_title_name}}</text><text>{{item.department_custom_name}}</text></view>
          <view class="hospital">{{item.hospital.hospital_name}}</view>
          <view class="goodjob" wx:if="{{item.be_good_at}}">擅长：{{item.be_good_at}}</view>
          <!-- <view class="diseaseType" wx:for="{{item.doctor_expertise}}" wx:for-item="cell" wx:key="expertise_id">{{cell.expertise_name}}</view> -->
          <!-- <view class="detail">
            <view>好评率: <text>{{item.praise_rate}} </text> </view>
            <view>服务患者数: <text>{{item.served_patients_num}}</text></view>
            <view>平均回复: <text> {{item.avg_response_time}}</text></view>
          </view> -->
          <view class="consultbox">
            <!-- <view class="price" wx:if="{{item.is_img_welfare_reception==1}}">公益问诊：<text>￥{{item.free_clinic_price}}</text></view>
            <view class="price" wx:else>专家问诊：<text>￥{{item.price}}</text></view> -->
            <view class="price" wx:if="{{moduleFilter.formatInquiryType(item.doctor_inquiry_config)==1}}">公益问诊：<text>￥{{item.free_clinic_price}}</text></view>
             <view class="price" wx:elif="{{moduleFilter.formatInquiryType(item.doctor_inquiry_config)==2}}">专家问诊：<text>￥{{item.price}}</text></view>
            <view class="price" wx:else></view>
          
          </view>
        </view>
      </view>
      </view>
      <view class="nonedata" wx:elif="{{toggle && doctorList.length==0}}">暂无数据！</view>
    </scroll-view>
  </view>
</view>