<!--packageA/mycomponent/goodsComponent/plugin/timeAppointment/timeAppointment.wxml-->

<view class="timeAppointment">
    <view class="timeAppointmentUser">
      <view class="headTop">
        <i class="iconfont icon-fontclass-rengezhongxin"></i>
        <view class="title">选择{{reserve_obj_text}}</view>
      </view>
      <view class="checkList">
        <van-radio-group value="{{radio}}" bindchange="onChangeRadio">
          <view class="lis" wx:for="{{personnel}}">
            <view style="display: flex;align-items: center;">
              <van-radio name="{{item.id}}" checked-color="#f42a26" icon-size="40rpx"></van-radio>
            </view>
            
            <view class="lisRight" bindtap="gotoUserDe" data-id="{{item.id}}">
              <view class="leftImg">
                <image src="{{item.thumb}}" ></image>
              </view>
              <view class="rightBox">
                <view class="name">{{item.name}}</view>
                <view class="intro">{{item.description}}</view>
                <view class="priceTxt">
                  {{service_text}}费:
                  <text class="price">￥{{item.price}}</text>
                </view>
              </view>
            </view>
          </view>
        </van-radio-group>
      </view>
    </view>
    <view class="timeSelectCon">
      <view class="headTop">
        <i class="iconfont icon-fontclass-xianshi"></i>
        <view class="title">选择预约时间</view>
      </view>
      <view class="calendar" wx:if="{{dateArr.length>0}}">
        <view class="weekDate">
          <view class="weekDateIn {{index==day_index ? 'active' : ''}}" wx:for="{{dateArr}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="setDayIndex">
            <text class="spanTop">{{ index == 0 ? "今天" : item.week }}</text>
            <text class="spanDay {{item.status==0 ? 'spanDisabled' : ''}} spanActive">{{ item.day }}</text>
          </view>
        </view>
        <view class="timelist">
          <view class="timeSelect {{item.status==0 ? 'timeDisabled' : ''}} {{index==time_index? 'timeActive' : ''}}" wx:for="{{dateArr[day_index].periods}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="setTimeIndex">{{item.period_time_start_str}}</view>
        </view>
      </view>
      <view wx:else style="color: #424242;text-align: center;">暂无可预约时间</view>
    </view>
  </view>


<view class="footer">
  
  <view class="left">
      <view class="text">{{reserve_obj_text}}：{{personnel_obj.name}}</view>
      <view class="text" wx:if="{{time_index}}">预约时间：{{day_obj.month}} {{time_obj.period_time_start_str}}</view>
      <view class="notText" wx:else>请选择预约时间</view>
  </view>
  <view class="btn" bindtap="gotoOrder">
    <!-- <block wx:if="{{false}}">立即预约</block>
    <block wx:if="{{true}}"> -->
      <view class="small">立即预约</view>
      <view class="small">￥{{personnel_obj.price}}</view>
    <!-- </block> -->
  </view>
</view>



