<!--pages/expertConsult/expertConsult.wxml-->
<nav navName="{{navName}}"></nav>
<wxs src="../../../filters/filter.wxs" module="moduleFilter"></wxs>

<view class="wraper">

  <view class="containexpert" style="height:{{scrollHeight}}rpx">
    <view class="searchbox">
      <input type="text" placeholder="输入姓名或医院查找医生"  disabled="{{true}}"		bindtap="goSearch"	bindconfirm="getIptvalue"/>
      <image src="{{img_host+'/ss.png'}}"></image>
    </view>
    <view class="page-section-spacing" >
      <scroll-view class="scroll-view_H" scroll-x="true" style="width: 100%">
        <view class="row"  wx:for="{{sickList}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
          <view class="scroll-view-item_H {{tabId==item.expertise_id?'active':''}}" wx:for="{{itemName}}" wx:key="expertise_id"   data-id="{{item.expertise_id}}"  bindtap="switchTab" >{{item.expertise_name}}</view>
        </view>
      </scroll-view>
    </view>
  </view>
  
    <view class="dropdown">
   
    <van-dropdown-menu active-color="#3CC7C0" overlay="{{overlay}}" style="width:66.66%;position: relative;">
      <view class="bar"></view>
      <van-dropdown-item  title-class="droptitle {{selectarea?'active':''}}" title="{{position}}" bind:open="openCity" bind:close="closeCity" id="item" popup-style="itemPop" > </van-dropdown-item>
      <view class="dropbar"></view>
      <van-dropdown-item  title-class="droptitle {{selectkind?'active':''}}" value="{{ sort_order }}" options="{{ option }}" bind:change="changeSorder" />
    </van-dropdown-menu>
    <view class="dropOnline {{is_online==1?'active':''}}" bindtap="toggleOnline">优先在线</view>
  </view>


  <view class="scrollwraper">
    <scroll-view scroll-y style="width: 100%;height:100%" 	bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}"	refresher-threshold="100"	refresher-enabled="true"  bindscrolltolower="lower" bind:scroll="onScroll" id="scroller" 	bounces="false">
      <view wx:if="{{doctorList.length>0}}">
        <view class="viewcell" bindtap="goExpertDetail" wx:for="{{doctorList}}" wx:key="doctor_id" data-doctorid="{{item.doctor_id}}">
        <view class="left">
        
          <image src="{{item.avatar}}" wx:if="{{item.avatar}}" mode="aspectFill"></image>
          <image src="{{img_host+'/octor_avatar.png'}}"  wx:else></image>
          <view class="onlinebox" wx:if="{{item.user.is_online==1}}">
           <image src="{{img_host+'/online.gif'}}" mode="" class="icon"/>
          </view>
        </view>
        <view class="right">
          <view class="namebox">
            <view class="name">{{item.user_name}}</view>
            <!-- <view class="position" >{{item.doctor_title_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="hospital_name"  wx:if="{{item.doctor_title_name}}">{{item.doctor_title_name}}</text> <text wx:if="{{item.department_custom_name}}">{{item.department_custom_name}}</text></view>
          <view class="hospital"><text class="hospital_name" >{{item.hospital.hospital_name}}</text></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="index">{{cell.expertise_name}}</view>
          <view class="detail" wx:if="{{item.is_display_score}}">
            <view>评分: <text wx:if="{{item.praise_rate>0}}">{{item.praise_rate}} </text><text wx:else>暂无</text></view>
            <view>问诊量: <text  wx:if="{{item.served_patients_num>0}}">{{item.served_patients_num}}</text><text wx:else>暂无</text></view>
            <view>平均回复: <text  wx:if="{{item.avg_response_time>0}}"> {{moduleFilter.formatReply(item.avg_response_time)}}h</text><text wx:else>暂无</text></view>
          </view>
          <view class="consultbox">
            <view class="price" wx:for="{{item.doctor_inquiry_config}}" wx:for-item="itemName" wx:if="{{((itemName.inquiry_type==1 && !(moduleFilter.hasFree(item.doctor_inquiry_config) && itemName.inquiry_mode==1 ) && (itemName.inquiry_mode==1 || itemName.inquiry_mode==2) ) || itemName.inquiry_type==3 && itemName.is_enable==1)}}">
              <view  class="pricecell" wx:if="{{itemName.inquiry_type==3  }}">图文问诊：<text>￥{{itemName.inquiry_price}}</text><text wx:if="{{moduleFilter.formatPrice(item.doctor_inquiry_config)}}" class="expert_prcie">￥{{moduleFilter.formatPrice(item.doctor_inquiry_config)}}</text></view>
              <view  class="pricecell" wx:elif="{{itemName.inquiry_type==1 && !(moduleFilter.hasFree(item.doctor_inquiry_config) && itemName.inquiry_mode==1) && (itemName.inquiry_mode==1 || itemName.inquiry_mode==2) }}" > {{itemName.inquiry_mode==1?'图文问诊':itemName.inquiry_mode==2?'视频问诊':'其他问诊'}}：<text class="{{(itemName.is_enable==0 && itemName.inquiry_mode==2)?'priceactive':'' }}">￥{{itemName.inquiry_price}}</text></view>
            </view>
           
          </view>
        </view>
      </view>
      </view>
  
      <view class="nonedata" wx:else>暂无数据！</view>
      <!-- <view class="viewcell">
        <view class="left">
          <image src="https://img.applets.igandanyiyuan.com/applet/patient/static/home.png"></image>
        </view>
        <view class="right">
          <view class="namebox">
            <view class="name">魏胜昭</view>
            <view class="position"> 教授</view>
            <view class="type">三甲</view>
            <view class="type">可处方</view>
          </view>
          <view class="hospital">首都医科大学佑安医院 <text decode="true">&nbsp;耳鼻科</text></view>
          <view class="goodjob">擅长：治疗耳鼻喉疑难病。比如： 人工关节置换、传导性耳聋、人工晶体植入、肾移···</view>
          <view class="diseaseType">中西医结合</view>
          <view class="detail">
            <view>好评率: <text>5 </text> </view>
            <view>服务患者数: <text>100</text></view>
            <view>平均回复: <text> 0.5h </text></view>
          </view>
          <view class="consultbox">
            <view class="price">公益问诊：<text>￥100</text></view>
            <view class="consult">立即咨询</view>
          </view>
        </view>
      </view> -->
    </scroll-view>
  </view>
</view>
<van-popup
  show="{{ show }}"
  round
  position="bottom"
  custom-style="height: 50%"
  bind:close="onClose"
>
<van-picker columns="{{ columns }}" loading="{{isLoding}}"  show-toolbar
  title="选择城市"
  columns="{{ columns }}"
  value-key="area_name"
  bind:cancel="onCancel"
  bind:change="onChange"
  bind:confirm="onConfirm"/>
</van-popup>
