<wrapper>
  <view class="doctor-page">
    <view class="doctor-info">
      <view>
        <image class="doctor-avatar" src="{{ doctor.picUrl }}"></image>
      </view>

      <view class="doctor-txt">
        <view>
          <text class="doctor-name">{{ doctor.name }}</text>
          <text class="doctor-title">{{ doctor.level }}</text>
        </view>
        <text number-of-lines="5" class="doctor-intro">{{ doctor.description }}</text>
        <view class="doctor-more" a:if="{{ doctor.doctorId }}"><text onTap="showIntro">查看更多</text></view>
      </view>
    </view>

    <view a:for="{{ days }}" key="{{ index }}" class="day-item">
      <view class="day-title">{{ item.date }}<text a:if="{{ item.today }}">（今天）</text></view>
      <order-session item="{{ item }}">
        <view slot-scope="props" class="num-item-content">
          <view a:for-item="row" a:for="{{ props.rows }}" key="{{ idx }}" a:for-index="idx" class="day-range {{ row.remain > 0 ? 'active' : '' }}">
            <view class="day-line">
              <view class="day-t">{{ row.name }}</view>
              <view>剩余{{ row.remain }}</view>
            </view>
            <view class="day-line">
              <view class="day-price">￥{{ row.min }}</view>
              <view class="day-btn" a:if="{{ row.remain > 0 }}" onTap="onAppointment" data-row="{{ row }}">预约</view>
              <view class="day-btn" a:else>已约满</view>
            </view>
          </view>
        </view>
      </order-session>
    </view>

    <view class="doctor-comment" a:if="{{ endTime }}">{{ endTime }}及之后如期待放号</view>
  </view>

  <doctor-introduction show="{{ showIntro }}" doctorId="{{ doctor.doctorId }}" onClose="onClose"/>

  <!--时间段-->
  <time-range
    show="{{ showRange }}"
    rangeItem="{{ rangeItem }}"
    params="{{ routeState }}"
    onClose="onTimeRangeClose"
  />
</wrapper>
