<wxs src="../../../filters/filter.wxs" module="filter" />
<nav navName="专家详情"></nav>
<view class="contain">
 
  <view class="boxwraper">
    <view class="infobox">
      <view class="namebox">
        <view class="left">
          <image src="{{avatar}}" class="head" wx:if="{{avatar}}" mode="aspectFill"></image>
        <image  class="head" src="{{img_host+'/doctor_avatar.png'}}" wx:else></image>
        <view class="onlinebox"  wx:if="{{is_online==1}}">
           <image src="{{img_host+'/online.gif'}}" mode="" class="icon" style="top:100rpx" />
          </view>
        </view>
        <view class="namewraper">
          <view class="row">
            <view class="name">{{user_name}}</view>
            <view class="type" wx:if="{{hospital.hospital_level_name != '未知'&& hospital.hospital_level_name}}">{{hospital.hospital_level_name}}</view>
            <view class="type" wx:if="{{multi_point_status == 1 && multi_point_enable==1}}">可处方</view>
          </view>
          <view class="hospital" ><text wx:if="{{doctor_title_name}}" class="doctor_title">{{doctor_title_name}}</text><text>{{department_custom_name}}</text></view>
          <view class="hospital">{{hospital.hospital_name}}</view>
        </view>
        <view class="guanzhu" wx:if="{{!follow}}" bindtap="toggleFllow">
          <image src="{{img_host+'/star.png'}}" ></image>
          <text decode="true">&nbsp;&nbsp;关注</text>
        </view>
        <view class="guanzhu" wx:else bindtap="toggleFllow">
          <image src="{{img_host+'/star_on.png'}}" ></image>
          <text decode="true">&nbsp;&nbsp;关注</text>
        </view>
      </view>
      <view class="descbox">
        <view class="cell">
          <view class="number" wx:if="{{praise_rate>0}}">{{praise_rate}}</view>
          <view class="nodata" wx:else>暂无</view>
          <view class="name">评分</view>
        </view>
        <view class="cell">
          <view class="number" wx:if="{{served_patients_num>0}}">{{served_patients_num}}</view>
          <view class="nodata" wx:else>暂无</view>
          <view class="name">问诊量</view>
        </view>
        <view class="cell">
          <view class="number" wx:if="{{avg_response_time>0}}">{{filter.formatReply(avg_response_time)}}h</view>
          <view class="nodata" wx:else>暂无</view>
          <view class="name">平均回复</view>
        </view>
        <view class="cell">
          <view class="number" wx:if="{{number_of_fans>0}}">{{number_of_fans}}</view>
          <view class="nodata" wx:else>暂无</view>
          <view class="name">关注数</view>
        </view>
      </view>
      <view class="goodjob ellipsis">
        {{brief_introduction}}
      </view>
      <view class="renzhenbox">
        <view class="renzhen {{iden_auth_status==1?'active':''}}">
          <image src="{{img_host+'/renzheng.png'}}" ></image>
          <text>医生信息已认证</text>
        </view>
        <view class="intro" bindtap="showPop">
          <text> 医生简介</text>
          <image src="{{img_host+'/jjarrow.png'}}"></image>
        </view>
      </view>

    </view>
    <view class="wz_tabbox">
      <view class="titlebox">
        <view class="title">医生服务</view>
        <viwe class="tag" wx:if="{{filter.formatYear(days)}}">{{filter.formatYear(days)}}内服务过您</viwe>
      </view>
      <scroll-view class="tabbox"  scroll-x  scroll-into-view="{{toView}}">
        <view class="tabs">
        <view class="tab " bindtap="switchTab" data-id="0" id="item0">
           <image  wx:if="{{currentData==0 && canTuwen}}" src="{{img_host+'/tuwen_on.png'}}" alt="" class="tabbg on" ></image>
           <image wx:elif="{{currentData==0 && !canTuwen}}" src="{{img_host+'/tuwen_disable_on.png'}}" alt="" class="tabbg on" ></image>
           <image wx:elif="{{currentData!=0 && canTuwen}}" src="{{img_host+'/tuwen.png'}}" alt="" class="tabbg" ></image>
           <image wx:else src="{{img_host+'/tuwen_disable.png'}}" alt="" class="tabbg" ></image>
           <view class="restNumber"  wx:if="{{canTuwen && expertInquiry_price && current_inquiry_config.inquiry_type==3 && restNumber!=0}}">仅剩{{restNumber>0?restNumber:0}}个名额</view>
           <view class="typebox" wx:if="{{canTuwen}}">
             
              <view class="name">图文问诊</view>
              <view class="pricebox" wx:if="{{hasExpert && !hasFree}}">
                <view class="price">￥{{expertInquiry_price}}/次</view>
              </view>
              <view class="pricebox" wx:if="{{!hasExpert && hasFree}}">
                <view class="price">￥{{freePrice}}/次</view> 
              </view>
              <view class="pricebox" wx:if="{{hasExpert && hasFree}}">
                <view class="price" wx:if="{{freeAmount>0}}">￥{{freePrice}}/次</view> 
                <view class="price" wx:if="{{freeAmount<=0 && expertAmount>0}}">￥{{expertInquiry_price}}/次</view>
                <view class="price" wx:if="{{freeAmount<=0 && expertAmount<=0}}">￥{{freePrice}}/次</view> 
                <view class="jiaprice" wx:if="{{expertInquiry_price && current_inquiry_config.inquiry_type==3 && !(freeAmount<=0 && expertAmount>0)}}">￥{{expertInquiry_price}}/次</view>
              </view>
              <!-- <view class="price">￥{{current_inquiry_config.inquiry_price}}/次</view>
              <view class="jiaprice" wx:if="{{expertInquiry_price && current_inquiry_config.inquiry_type==3 }}">￥{{expertInquiry_price}}/次</view> -->
           </view>
          <view class="typebox disable" wx:else>
              <view class="name">图文问诊</view>
              <view class="price" wx:if="{{expertInquiry_price}}">￥{{expertInquiry_price}}/次</view>
     
              <view class="price" wx:if="{{!(expertInquiry_price && freePrice)}}">暂未开通</view>
           </view> 
        </view>
        <view class="tab add" bindtap="switchTab" data-id="1" id="item1">
       
            <image src="{{img_host+'/suifang_on.png'}}" alt="" class="tabbg"   wx:if="{{canVisit}}"></image>
              <image src="{{img_host+'/suifang_disable.png'}}" alt="" class="tabbg"   wx:else></image>
            <view class="typebox" >
              <view class="name">随访包</view>
              <view class="price" wx:if="{{visitPrice}}">￥{{visitPrice}}起</view>
               <view class="price" wx:else>暂未开通</view>
           </view> 
           <!-- <view class="typebox disable" wx:else >
              <view class="name">视频问诊</view>
              <view class="price">{{videoPrice?'￥'+videoPrice+'/次':'暂未开通'}}</view>
           </view>  -->
        </view>
        <view class="tab add" bindtap="switchTab" data-id="2" id="item2">
            <image src="{{img_host+'/healthy_on.png'}}" alt="" class="tabbg"  wx:if="{{canHealthy}}"></image>
             <image src="{{img_host+'/healthy_disable.png'}}" alt="" class="tabbg"  wx:else></image>
            <view class="typebox" >
              <view class="name">健康包</view>
              <view class="price" wx:if="{{healthyPrice}}">￥{{healthyPrice}}/次</view>
               <view class="price" wx:else>暂未开通</view>
           </view> 
        </view>
        <view class="tab " bindtap="switchTab" data-id="3" id="item3">
           <image src="{{img_host+'/video_on.png'}}" wx:if="{{currentData==3 && canVideo}}" alt="" class="tabbg on" ></image>
           <image wx:elif="{{currentData==3 && !canVideo}}" src="{{img_host+'/video_disable_on.png'}}" alt="" class="tabbg on" ></image>
           <image wx:elif="{{currentData!=3 && canVideo}}" src="{{img_host+'/video.png'}}" alt="" class="tabbg" ></image>
          <image wx:else src="{{img_host+'/video_disable.png'}}"  alt="" class="tabbg" ></image>
          <view class="typebox" wx:if="{{canVideo}}">
              <view class="name">视频问诊</view>
              <view class="price">￥{{videoPrice}}/次</view>
           </view> 
           <view class="typebox disable" wx:else >
              <view class="name">视频问诊</view>
              <view class="price">{{videoPrice?'￥'+videoPrice+'/次':'暂未开通'}}</view>
           </view> 
        </view>
       
        <view class="tab " bindtap="switchTab" data-id="4" id="item4">
           <image wx:if="{{currentData==4 && canDiffcult}}" src="{{img_host+'/yinan_on.png'}}" alt="" class="tabbg on" ></image>
           <image wx:elif="{{currentData==4 && !canDiffcult}}" src="{{img_host+'/yinan_disable_on.png'}}" alt="" class="tabbg on" ></image>
           <image wx:elif="{{currentData!=4 && canDiffcult}}" src="{{img_host+'/yinan.png'}}" alt="" class="tabbg" ></image>
           <image wx:else src="{{img_host+'/yinan_disable.png'}}" alt="" class="tabbg" ></image>
           <view class="typebox" wx:if="{{canDiffcult}}">
              <view class="name">疑难问诊</view>
              <view class="price">￥{{yinanPrice}}/次</view>
           </view>
         <view class="typebox disable" wx:else>
              <view class="name">疑难问诊</view>
              <view class="price">{{yinanPrice?'￥'+yinanPrice+'/次':'暂未开通'}}</view>
           </view> 
        </view>
       
      </view>
      </scroll-view>
    <swiper current="{{currentData}}" class="swiperbox"  bindchange="bindchange" style="height:{{tab3Height+'px'}};margin-top:{{tab3Height==0?'0rpx':'20rpx'}}">
          <swiper-item >
            
            <view class="swiper-item" id="swiperitem1">
              <image src="{{img_host+'/tuwen_bg.png'}}" class="itembg" style="height:auto;" mode="widthFix" wx:if="{{canTuwen}}"></image>
              <image src="{{img_host+'/tuwen_bg_disable.png'}}" class="itembg" style="height:auto;" mode="widthFix"  wx:else></image>
              <view class="itembox">
                <view class="title">通过文字、图片、语音进行咨询</view>
              <view class="tipbox {{!canTuwen?'active':''}}">
                <view class="tipmsg">
                  <view class="circle tuwen"></view>
                  <view class="msg">可通过文字、图片、语音等形式和医生进行沟通；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle tuwen"></view>
                  <view class="msg">医生接诊后24小时内10个沟通回合；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle tuwen"></view>
                  <view class="msg">医生未接诊，平台24小时内自动退款；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle tuwen"></view>
                  <view class="msg">医生未回复，可联系平台客服协商进行退款。</view>
                </view>
              </view>
              </view>
            </view>
          </swiper-item>
          <swiper-item class="swiper-item" id="swiperitem2"> </swiper-item>
          <swiper-item class="swiper-item" id="swiperitem3"> </swiper-item>
          <swiper-item>
            <view class="swiper-item" id="swiperitem4">
              <image src="{{img_host+'/video_bg.png'}}" class="itembg" style="height:auto;" mode="widthFix" wx:if="{{canVideo}}"></image>
              <image src="{{img_host+'/video_bg_disable.png'}}" style="height:auto;" mode="widthFix" class="itembg" wx:else></image>
              <view class="itembox">
                <view class="title">通过视频面对面进行咨询</view>
              <view class="tipbox {{!canVideo?'active':''}}">
                <view class="tipmsg">
                  <view class="circle video"></view>
                  <view class="msg">医生接诊后，主动和就诊人预约视频时间；</view>
                </view>
                <view class="tipmsg ">
                  <view class="circle video"></view>
                  <view class="msg">若预约时间因故需要改变，可与医生图文协商时间；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle video"></view>
                  <view class="msg">视频交流服务时长一般为5-10分钟；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle video"></view>
                  <view class="msg">医生接诊后48小时内可以通过文字、图片、语音等形式和医生不限制沟通回合数；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle video"></view>
                  <view class="msg">医生未接诊，平台24小时内自动退款；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle video"></view>
                  <view class="msg">医生未回复或未进行视频，可联系平台客服协商进行退款；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle video"></view>
                  <view class="msg">如因您个人原因（忘记时间、迟到、中途断开未在进入视频等情况），咨询费用可能将无法退回，请准时接收医生视频请求；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle video"></view>
                  <view class="msg">视频不支持回放。</view>
                </view>
               </view>
              </view>
            </view>
          </swiper-item>
          <swiper-item >
            <view class="swiper-item" id="swiperitem5">
              <image src="{{img_host+'/yinan_bg.png'}}" class="itembg" wx:if="{{canDiffcult}}" style="height:auto;" mode="widthFix"></image>
              <image src="{{img_host+'/video_bg_disable.png'}}" class="itembg" style="height:auto;" mode="widthFix" wx:else></image>
              <view class="itembox">
                <view class="title">通过文字、图片、语音进行咨询</view>
              <view class="tipbox {{!canDiffcult?'active':''}}">
                <view class="tipmsg">
                  <view class="circle yinan"></view>
                  <view class="msg">{{service_content}}；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle yinan"></view>
                  <view class="msg">{{service_process}}；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle yinan"></view>
                  <view class="msg">可通过文字、图片、语音等形式和医生进行沟通；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle yinan"></view>
                  <view class="msg" wx:if="{{canDiffcult}}">医生接诊后{{cycle}}天内{{(rounds!='' && rounds==0)?'不限':rounds+"个"}}沟通回合；</view>

                  <view class="msg" wx:else>医生接诊后{{cycle?cycle+'天':'【医生选择的服务周期】'}}内{{(rounds==='0' )?'不限':(rounds && rounds!==0)?rounds+"个":'【医生选择的服务次数】'}}沟通回合；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle yinan"></view>
                  <view class="msg">医生未接诊，平台24小时内自动退款；</view>
                </view>
                <view class="tipmsg">
                  <view class="circle yinan"></view>
                  <view class="msg">医生未回复或医生服务不满意，可联系平台客服协商进行退款。</view>
                </view>
              </view>
              </view>
             
            </view>
          </swiper-item>
      </swiper>
    </view>
    <!-- <view class="drbox" wx:if="{{current_inquiry_config}}">
      <view class="titlebox">
        <view class="title">医生服务</view>
        <viwe class="tag" wx:if="{{filter.formatYear(days)}}">{{filter.formatYear(days)}}内服务过您</viwe>
      </view>
      <view wx:if="{{current_inquiry_config}}">
        <view class="wentype" wx:if="{{current_inquiry_config.inquiry_type==1}}">
          <image src="{{img_host+'/dr.png'}}"></image>
          <image src="{{img_host+'/gou.png'}}"  class="gou"></image>
          <view class="rightbox">
            <view class="name" wx:if="{{current_inquiry_config.inquiry_type==1}}">专家问诊-图文问诊</view>
            <view class="price">￥{{current_inquiry_config.inquiry_price}}</view>
          </view>
        </view>
        <view class="wentype freewenzhen" wx:elif="{{current_inquiry_config.inquiry_type==3}}">
          <image src="{{img_host+'/freeicon.png'}}" ></image>
          <image src="{{img_host+'/huanggou.png'}}" class="gou"></image>
          <view class="rightbox">
            <view class="name">公益问诊-图文问诊</view>
            <view class="pricebox">
              <view class="price">￥{{current_inquiry_config.inquiry_price}}</view>
              <view class="rest">当前剩余名额: {{current_inquiry_config.work_num_day-current_inquiry_config.order_inquiry_count>0?(current_inquiry_config.work_num_day-current_inquiry_config.order_inquiry_count):0}} 个</view>
            </view>
          </view>
        </view>
        <view class="tips" wx:if="{{current_inquiry_config.duration!=0}}">
          <image src="{{img_host+'/duihua.png'}}" ></image>
          <view class="tipcon" wx:if="{{current_inquiry_config.times_number==0}}"><text>1.适合可以耐心等待医生回复的病情咨询</text><text>2.医生接诊后{{current_inquiry_config.duration/60}}小时内不限次数个回合沟通</text></view>
          <view class="tipcon" wx:else><text>1.适合可以耐心等待医生回复的病情咨询</text><text>2.医生接诊后{{current_inquiry_config.duration/60}}小时内{{current_inquiry_config.times_number}}个回合图文沟通</text></view>
        </view>
      </view>
    </view> -->
    <view class="commentbox" wx:if="{{commentList.length>0}}">
      <view class="titlebox">
        <view class="title">患者评价<text wx:if="{{commentList.length>0}}"> ({{totalComment}})</text></view>
        <view class="more" bindtap="goComment" hidden="{{commentList.length<=0}}">
          <text> 查看更多</text>
          <image src="{{img_host+'/right.png'}}"></image>
        </view>
      </view>
      <view class="listbox" wx:if="{{commentList.length>0}}">
        <view class="list" wx:for="{{commentList}}" wx:key="evaluation_id">
          <view class="namebox">
            <view class="namebox">
                <view class="name">{{item.name_mask}}</view>
                <view class="comemntType" wx:if="{{item.inquiry_mode==1}}">
                 图文
                </view>
                <view class="comemntType video" wx:elif="{{item.inquiry_mode==2 && item.inquiry_type==1}}">
                视频
                </view>
                <view class="comemntType yinan" wx:elif="{{item.inquiry_mode==6 && item.inquiry_type==1}}">
                疑难会诊
                </view>
            </view>
            <van-rate value="{{item.avg_score}}" size="{{ 18 }}" color="#ed9c00" void-icon="star" void-color="#eee" bind:change="onChange" gutter="2" readonly />
          </view>
          <view class="commment">{{item.content}}</view>
          <view class="datebox">
            <view class="sick_name">{{item.disease_class_name}}</view>
          <view class="date">{{filter.formatDate(item.created_at)}}</view>
          </view>
        </view>
      </view>
      <!-- <view class="nonedata" wx:else>
        暂无评价！
      </view> -->
    </view>
  </view>
  <!-- <view></view> -->
  <view class="ask" wx:if="{{(current_inquiry_config && current_inquiry_config.recieveStatus>0) && currentData==0}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
  <view class="ask" wx:elif="{{canVideo && currentData==3}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
  <view class="noask" wx:elif="{{!canVideo && currentData==3 && !hasVideoList}}"  hidden="{{!isFinished}}" data-type="{{currentData}}">暂不接诊</view>
  <view class="noask" wx:elif="{{!canVideo && currentData==3 && hasVideoList}}"  hidden="{{!isFinished}}" data-type="{{currentData}}">{{videoPrice?'暂不接诊':'暂未开通'}}</view>
  <view class="ask" wx:elif="{{canDiffcult && currentData==4}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
  <view class="noask" wx:elif="{{!canDiffcult && currentData==2}}"  hidden="{{!isFinished}}" data-type="{{currentData}}">{{yinanPrice?'暂不接诊':'暂未开通'}}</view>
  <view class="noask" bindtap="notAsk" data-type="{{currentData}}" wx:else hidden="{{!isFinished}}">{{(!current_inquiry_config.inquiry_price && !expertInquiry_price)?'暂未开通':'暂不接诊'}}</view>
</view>
<van-popup show="{{ show }}" round position="bottom" custom-style="height:65%" bind:close="onClose" lock-scroll="true">
  <image src="{{img_host+'/closepop.png'}}" class="close" bindtap="onClose"></image>
  <view class="popwrper">
    <view class="infobox" style="padding: 0rpx 52rpx 0rpx;margin-top: 32rpx;margin-bottom: 0rpx;padding-bottom: 0;">
      <view class="namebox" style="justify-content: flex-start;">
        <image src="{{avatar}}" class="head" wx:if="{{avatar}}" mode="aspectFill"></image>
        <image class="head"  src="{{img_host+'/doctor_avatar.png'}}"  wx:else></image>
        <view class="namewraper">
          <view class="row">
            <view class="name">{{user_name}}</view>
            <view class="type" wx:if="{{hospital.hospital_level_name != '未知'&& hospital.hospital_level_name}}">{{hospital.hospital_level_name}}</view>
            <view class="type" wx:if="{{multi_point_status == 1}}">可处方</view>
          </view>
          <view class="hospital" ><text wx:if="{{doctor_title_name}}" class="doctor_title">{{doctor_title_name}}</text><text>{{department_custom_name}}</text></view>
          <view class="hospital">{{hospital.hospital_name}}</view>
        </view>
      </view>
      <view class="borderbox">
        <view class="rowintro">
          <image src="{{img_host+'/jianjie.png'}}"></image>
          <text>医生简介</text>
        </view>
        <view class="goodjob" style="margin-top: 0rpx;">
          {{brief_introduction}}
        </view>
        <view class="line"></view>
      </view>
      <view class="borderbox" hidden="{{doctor_expertise.length<=0}}">
        <view class="rowintro">
          <image src="{{img_host+'/zhuanchang.png'}}"></image>
          <text>医生专长</text>
        </view>
        <view class="goodat" style="margin-top: 30rpx;">
          <scroll-view class="scroll-view_H" scroll-x="true"  style="width: 100%">
            <view class="cell" wx:for="{{doctor_expertise}}" wx:key="expertise_name">{{item.expertise_name}}</view>
        </scroll-view>
        
        </view>
        <view class="line"></view>
      </view>
      <view class="borderbox" wx:if="{{doctor_expertise.length>0}}">
        <view class="rowintro">
          <image src="{{img_host+'/shanchang.png'}}" ></image>
          <text>医生擅长</text>
        </view>
    
          <view class="goodjob" style="margin-top:20rpx">{{be_good_at}}</view>
      
        <view class="line"></view>
      </view>
    </view>
  </view>
</van-popup>
<dialog bind:confirm="confirm" showDialog="{{showDialog}}" message="当前存在有未完成的订单，是否前往该订单?"></dialog>