<!--index.wxml-->
<wxs src="../../filters/filter.wxs" module="moduleFilter"></wxs>
<van-overlay show="{{ show }}" lock-scroll="{{true}}" root-portal="{{true}}" z-index="999" custom-class="mask">
  <view class="fuliwrapper">
    <view class="fulititle">新人红包福利</view>
    <view class="fulicontent">
      <view class="fuliprice">¥<text class="price" decode="true">&nbsp;{{moduleFilter.formatMoney(popupData.coupon_price)}}</text></view>
      <!-- "application_scope": 1, // 适用范围（1:全部 2:快速问诊 3:专家问诊 4:公益问诊 5:问诊购药） -->
      <view class="rightbox">
        <view class="type" wx:if="{{popupData.application_scope==1}}">全场通用</view>
        <view class="type" wx:elif="{{popupData.application_scope==2}}">问诊适用</view>
        <view class="type" wx:elif="{{popupData.application_scope==3}}">按品牌适用</view>
        <view class="type" wx:elif="{{popupData.application_scope==4}}">按类别适用</view>
        <view class="type" wx:elif="{{popupData.application_scope==5}}">单品适用</view>
        <view class="expire" wx:if="{{popupData.valid_type==2 && popupData.valid_days>0}}">有效期{{popupData.valid_days}}天</view>
        <!-- <view class="expire" wx:elif="{{popupData.valid_type==1}}">有效期：{{popupData.valid_end_time}}</view> -->
      </view>

      <!-- <view class="rightbox" wx:else>
        <view class="type" wx:if="{{popupData.application_scope==1}}">所有问诊类型</view>
        <view class="type" wx:elif="{{popupData.application_scope==2}}">快速问诊</view>
        <view class="type" wx:elif="{{popupData.application_scope==3}}">专家问诊</view>
        <view class="type" wx:elif="{{popupData.application_scope==4}}">公益问诊</view>
        <view class="type" wx:elif="{{popupData.application_scope==5}}">问诊购药</view>
        <view class="expire" wx:if="{{popupData.valid_type==2 && popupData.valid_days>0}}">有效期{{popupData.valid_days}}天</view>
      </view> -->


    </view>
    <view class="fulibtn"  bindtap="goExpertAndCloseOld">专家问诊</view>
    <!-- <view  wx:if="{{!isOld}}">
      <view class="fulibtn" bindtap="goExpertAndClose" data-id="1" wx:if="popupData.application_scope==2 && popupData.inquiry_type==1">专家问诊</view>
    <view class="fulibtn" bindtap="goExpertAndClose" wx:elif="popupData.application_scope==2 && popupData.inquiry_type==2" data-id="2">快速问诊</view>
    <view class="fulibtn" bindtap="goExpertAndClose" wx:elif="popupData.application_scope==2 && popupData.inquiry_type==3" data-id="3">公益问诊</view>
    <view class="fulibtn" bindtap="goExpertAndClose" wx:elif="popupData.application_scope==2 && popupData.inquiry_type==4" data-id="4">问诊购药</view>
    <view class="fulibtn" bindtap="goExpertAndClose" wx:elif="popupData.application_scope==2 && popupData.inquiry_type==5" data-id="5">检测</view>
    <view class="fulibtn" bindtap="goExpertAndClose" wx:else data-id="6">去使用</view>
    </view>
    <view wx:else>
      <view class="fulibtn"  bindtap="goExpertAndCloseOld">专家问诊</view>
    </view> -->
    <image src="{{img_host+'/fulibg.png'}}" class="fulibg" lazy-load="true"></image>
    <image src="{{img_host+'/closefuli.png'}}" class="closefuli" bindtap="onClickHide"></image>
  </view>
</van-overlay>
<van-overlay show="{{ showIntro }}" lock-scroll="{{true}}" z-index="9999" custom-class="mask">
  <view class="introbox">
    <image src="{{img_host+'/intro.png'}}" class="introimg" mode='widthFix'></image>
    <view class="btnbox_know">
      <view class="btn" bindtap="closeIntro">
        我知道了
      </view>
    </view>
  </view>
</van-overlay>
<nav-bar bind:handleFocus="handleFocus"></nav-bar>
<view class="container">
  <view class="containIndex">
    <view class="wenzhen">
      <view class="wenzhenbox">
        <view class="wenzhencell" bindtap="goquickExpert">
          <view class="row">
            <view>快速问诊</view>
            <image src="{{img_host+'/kswz.png'}}"></image>
          </view>
          <view class="desc">
            5分钟接诊不耽误
          </view>
        </view>
        <view class="wenzhencell" bindtap="goExpert">
          <view class="row">
            <view>专家问诊</view>
            <image src="{{img_host+'/zjwz.png'}}"></image>
          </view>
          <view class="desc">
            专业医生，服务保障
          </view>
        </view>
      </view>
      <view class="buybox" bindtap="goconsultandbuy">
        <view class="left">
          <view>问诊购药</view>
          <view class="desc">在线复诊，正品无忧，送药到家</view>
        </view>
        <view class="right">
          <image src="{{img_host+'/yao.png'}}"></image>
        </view>
      </view>

    </view>
    <view class="cellbox">
      <view class="cell" bindtap="freeConsult">
        <image src="{{img_host+'/gywz.png'}}"></image>
        <view class="name">公益问诊</view>
      </view>
      <view class="cell" bindtap="goMall">
        <image src="{{img_host+'/gdmall.png'}}"></image>
        <view class="name">肝胆商城</view>
      </view>
      <view class="cell" bindtap="goCheck">
        <image src="{{img_host+'/tangzu.png'}}"></image>
        <view class="name">糖组检测</view>
      </view>
    </view>
    <view class="ad">
      <swiper class="swiper" indicator-dots="{{true}}" circular="{{true}}" indicator-active-color="#3CC7C0" autoplay="{{true}}" interval="3000">
        <block wx:for="{{banner}}" wx:key="banner_id">
          <swiper-item>
            <view class="swiper-item">
              <image class="swiperimg" src="{{item.banner_path}}" data-url="{{item.banner_link}}" data-name="{{item.banner_name}}" bindtap="goH5"></image>
            </view>
          </swiper-item>
        </block>
      </swiper>
    </view>
    <view class="mydoctor" wx:if="{{my_doctor.length>0}}">
      <view class="titlebox">
        <view class="title">我的医生</view>
        <view class="more" wx:if="{{my_doctor.length>5}}" bindtap="goMydoctor">更多<image src="{{img_host+'/right.png'}}"></image>
        </view>
      </view>
      <view class="page-section-spacing">
        <scroll-view class="scroll-view_H" scroll-x="true" style="width: 100%" show-scrollbar="false" enhanced="true">
          <view class="scroll-view-item_H" wx:for="{{my_doctor}}" wx:key="doctor_id" bindtap="goExpertDetail" data-id="{{item.doctor_id}}">
            <view class="close" catchtap="confirmDel" data-id="{{item.doctor_id}}" data-index="{{index}}">
              <image src="{{img_host+'/close.png'}}"></image>
            </view>
            <view class="left">
              <image src="{{item.avatar}}" wx:if="{{item.avatar}}" mode="aspectFill"></image>
              <image src="{{img_host+'/doctor_avatar.png'}}" wx:else></image>
            </view>
            <view class="right">
              <view class="namebox mydoctorbox">
                <view class="name">{{item.user_name}}</view>
                <view class="position">{{item.doctor_title}}</view>
              </view>
              <view class="hospital mydoctor">{{item.hospital_name}}</view>
              <view class="service">{{item.days}}天内服务过您</view>
            </view>
          </view>
        </scroll-view>
      </view>

    </view>
    <view class="recommend" wx:if="{{recommend_doctor.length>0}}">
      <view class="titlebox">
        <view class="title">推荐医生</view>
      </view>
      <view class="viewbox">
        <view class="viewcell" wx:for="{{recommend_doctor}}" wx:key="doctor_id" bindtap="goExpertDetail" data-id="{{item.doctor_id}}">
          <view class="left">
            <image src="{{item.avatar}}" wx:if="{{item.avatar}}" mode="aspectFill"></image>
            <image src="{{img_host+'/doctor_avatar.png'}}" wx:else></image>
            <view class="onlinebox" wx:if="{{item.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="type" wx:if="{{item.hospital_level_name != '未知'&& item.hospital_level_name}}">{{item.hospital_level_name}}</view>
              <view class="type" wx:if="{{item.multi_point_status == 1 && item.multi_point_enable==1}}">可处方</view>
            </view>
            <view class="hospital"><text class="doctor_title" wx:if="{{item.doctor_title}}">{{item.doctor_title}}</text><text>{{item.department_custom_name}}</text></view>
            <view class="hospital">{{item.hospital_name}}</view>
            <view class="goodjob" wx:if="{{item.be_good_at}}">擅长：{{item.be_good_at}}</view>
            <view class="consultbox" style="margin-bottom: 45rpx;">
            <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 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>
</view>
<dialog bind:confirm="confirm" showDialog="{{showAlert}}" message="确定删除该服务过的医生？"></dialog>
<dialog showDialog="{{showCode}}" message="{{codeMsg}}"></dialog>

<van-overlay show="{{ showEntryTip }}" zIndex="9999">
 <view class="wrapper">
  <view class="privacyBox">
  <view class="title">温馨提示</view>
  <view class="entrymsg">
    <view> 亲爱的用户，感谢您信任并使用肝胆相照互联网医院！我们依据最新法律法规的要求，制定了<text class="navigator" bindtap="goAgreement" data-id="2">《隐私协议》</text>。请您仔细阅《隐私协议》，并确认了解我们对您的个人信息处理原则。</view>
    <view>如您同意《隐私协议》，请点击“同意”开始使用我们的产品和服务。</view>
  </view>
<view class="btnbox">
   <view class="cancel" bindtap="onCloseEntry">不同意</view>
  <button id="agree-btn" 
  plain
  class="confirm" 
  open-type="agreePrivacyAuthorization" bindagreeprivacyauthorization="onConfirmEntry">同意并继续</button>
</view>
</view>
 </view>
</van-overlay> 
<!-- <van-dialog zIndex="9999" use-slot title="温馨提示" show="{{ showEntryTip }}" show-cancel-button confirm-button-text="同意并继续" cancel-button-text="不同意" confirm-button-color="#3CC7C0" bind:confirm="onConfirmEntry" bind:cancel="onCloseEntry" before-close="{{beforeClose}}" confirm-button-open-type="agreePrivacyAuthorization">
  <view class="entrymsg">
    <view> 亲爱的用户，感谢您信任并使用肝胆相照互联网医院！我们依据最新法律法规的要求，制定了<text class="navigator" bindtap="goAgreement" data-id="2">《隐私协议》</text>。请您仔细阅《隐私协议》，并确认了解我们对您的个人信息处理原则。</view>
    <view>如您同意《隐私协议》，请点击“同意”开始使用我们的产品和服务。</view>
  </view>

</van-dialog> -->
<van-overlay show="{{ showEntryTip_second }}" zIndex="99999">
 <view class="wrapper">
  <view class="privacyBox">
  <view class="title">温馨提示</view>
<view class="entrymsg" >
 <view> 很抱歉，如您不同意《隐私协议》，可能无法继续正常使用我们的服务，请您先同意哦~</view>
</view>
<view class="btnbox">
   <view class="cancel" bindtap="onCloseEntry_second">不同意</view>
  <button id="agree-btn" 
  plain
  class="confirm" 
  bindtap="onConfirmEntry_second">好的</button>
</view>
</view>
 </view>
</van-overlay> 
<!-- <van-dialog zIndex="99999" title="温馨提示" show="{{ showEntryTip_second }}" message="很抱歉，如您不同意《隐私协议》，可能无法继续正常使用我们的服务，请您先同意哦~" show-cancel-button confirm-button-text="好的" cancel-button-text="不同意" confirm-button-color="#3CC7C0" bind:confirm="onConfirmEntry_second" bind:cancel="onCloseEntry_second">
</van-dialog> -->