<view id="article">
  <view class="head_child">
    <view class="head_child_info" wx:if="{{list.length>0}}">
      <view class="flex-item1">{{userInfo.childName}}</view>
      <view class="flex-item3" bindtap="selectChilds" wx:if="{{list.length>1}}">
        <view class="image_icon"></view>
        <view>切换儿童</view>
      </view>
    </view>
    <view class="noneChild" wx:else>
      <text>暂无学员</text> 
      <text>（购买成长课后即可成为学员）</text>
      <text bindtap="jumpToHome">立即购买 >></text>
    </view>
    <view class="flexBox flex-item2">
        <text>总课数<text class="txt">{{userInfo.curriculum.courseNum ||0}}</text></text>
        <text>预约中<text class="txt">{{userInfo.curriculum.courseReservedNum ||0}}</text></text>
        <text>已完成<text class="txt">{{userInfo.curriculum.courseCompleteNum ||0}}</text></text>
        <text>剩余数<text class="txt">{{userInfo.curriculum.courseActnum ||0}}</text></text>
    </view>
  </view>
  <view class="flexBox tabSelect {{fixTop?'fixed_Top':''}}">
    <view class="tab-item {{currentIndex == 1 ? ' active':''}}" data-index="1" bindtap="setTabbar">
      <view class="label">领队约课</view>
    </view>
    <view class="tab-item {{currentIndex == 4 ? ' active':''}}" data-index="4" bindtap="setTabbar">
      <view class="label">领域约课</view>
    </view>
    <view class="tab-item {{currentIndex == 2 ? ' active':''}}" data-index="2" bindtap="setTabbar">
      <view class="label">时间约课</view>
    </view>
    <view class="tab-item {{currentIndex == 3 ? ' active':''}}" data-index="3" bindtap="{{canBuy==1?'setTabbar':'tip'}}">
      <view class="label">预约记录</view>
    </view>
  </view>
  <view class="content">
    <view class="tab-content" wx:if="{{currentIndex == 1}}">
      <view class="search_name">
        <view class="mini-btn" bindtap="bindSearch">搜索</view>
        <view class="weui-input">
          <text class="icon iconfont icon-search"></text>
          <input placeholder="请输入领队花名" placeholder-class="placeholder" confirm-type="search" bindinput="bindinput" value="{{searchText}}" bindconfirm="bindSearch"/>
        </view>
      </view>
      <scroll-view class="leader_select" scroll-x="{{scroll}}" scroll-left="{{scrollLeft}}" show-scrollbar="{{!scroll}}" enhanced="{{scroll}}" bindscrolltolower="pageLoad">
        <view wx:for="{{leaderList}}" wx:key="*this" data-uid="{{item.uid}}"  bindtap="selectLeader" class="user_list {{item.uid == leaderid?'leader_active':''}}">
          <view class="flex_leaderInfo">
            <view class="user_headImg">
              <image class="img" src="{{item.avatar}}"></image>
              <view class="Mask" wx:if="{{item.uid != leaderid}}"></view>
            </view>
            <view class="user_name">
              {{item.nickname}}
            </view>
            <view class="user_city" wx:if="{{item.leaderCity}}">( {{item.leaderCity}} )</view>
          </view>
        </view>
      </scroll-view>
    </view>
    <view class="tab-content" wx:if="{{currentIndex == 2}}">
      <view class="date_Cloumn">
        <view class="calendar {{item.completeDate == dateActived ?'calendar_active':''}}" wx:for="{{SevenDaysDate}}" wx:key="index" data-completeDate="{{item.completeDate}}" bindtap="selectDate">
          <view class="date">{{item.date}}</view>
          <view class="week">{{item.week}}</view>
          <view class="point" wx:if="{{item.num !=0}}"></view>
        </view>
      </view>
      <view class="more_Date" bindtap="getDatepopup">
        <view class="more_Date_block">
          <view>更多</view>
          <view>日期</view>
        </view>
      </view>
    </view>
    <view class="tab-content" wx:if="{{currentIndex == 4}}">
      <view class="field_option">
        <view class="field_option_clomun">
          <view bindtap="fieldSelect" class=" {{fieldIndex==1?'fieldChecked':''}} "data-index="1" data-content="全部">全部</view>
          <view bindtap="fieldSelect" class=" {{fieldIndex==2?'fieldChecked':''}}" data-index="2" data-content="人际交往">人际交往</view>
          <view bindtap="fieldSelect" class=" {{fieldIndex==3?'fieldChecked':''}}" data-index="3" data-content="学习烦恼">学习烦恼</view>
        </view>
        <view class="field_option_clomun">
          <view bindtap="fieldSelect" class=" {{fieldIndex==4?'fieldChecked':''}}" data-index="4" data-content="性格塑造">性格塑造</view>
          <view bindtap="fieldSelect" class=" {{fieldIndex==5?'fieldChecked':''}}" data-index="5" data-content="情绪管理">情绪管理</view>
          <view bindtap="fieldSelect" class=" {{fieldIndex==6?'fieldChecked':''}}" data-index="6" data-content="校园生活">校园生活</view>
        </view>
        <view class="field_option_clomun">
          <view bindtap="fieldSelect" class=" {{fieldIndex==7?'fieldChecked':''}}" data-index="7" data-content="病毒退退退">病毒退退退</view>
         
        </view>
      </view>
    </view>

    <view class="curriculum_list">
      <view wx:if="{{cardList.length>0}}">
        <view class="card" wx:for="{{cardList}}" wx:key="*this" data-id="{{item.id}}" data-leaderRecom="{{item.leaderRecom}}" catchtap="jumpToDetail">
        <view class="curriculum_card">
          <view class="info_left">
            <view class="curriculum_title">课程名：{{item.title}}</view>
              <view class="leader_Info">
                <view style="display: table;">
                  <image src="{{item.teacherAvatar}}"></image>
                  <text>{{item.teacherName+' ( '+item.teacherCity+' )'}}</text>
                </view>
              </view>
              <view>关键词：<text>{{item.keywords}}</text></view>
              <view>探究领域：<text>{{item.field}} ( {{item.ages}} )</text></view>
              <view>上课时间：<text>{{item.startTimeStr}}</text></view>
          </view>
          <view class="info_right">
            <view class="btn">
              <button class="mini-btn" type="warn" size="mini" catchtap="appointment" data-item="{{item}}" data-status="0" wx:if="{{item.status==0}}">预 约</button>
              <button class="mini-btn" type="default" disabled="true" size="mini" wx:if="{{item.status==2}}">{{currentIndex == 3?'已 评 价':'已 结 束'}}</button>
              <button class="mini-btn" type="primary" size="mini" wx:if="{{item.status==1 || item.status==6}}">{{item.status==1?'已 满 额':'预约已停止'}}</button>
              <button class="mini-btn" type="warn" size="mini" plain="true" catchtap="appointment" data-item="{{item}}" data-status="1" wx:if="{{item.status==3}}">取消预约</button>
              <button class="mini-btn" size="mini" style="background:#4db1ec;color:#fff" wx:if="{{item.status==4}}">待 上 课</button>
              <button class="mini-btn" size="mini" type="primary" wx:if="{{item.status==7}}" catchtap="jumpToEvaluate" data-id="{{item.id}}" data-leaderName="{{item.teacherName}}" data-city="{{item.teacherCity}}" data-courseTitle="{{item.title}}">待 评 价</button>
              <button class="mini-btn" type="warn" size="mini" disabled="true" wx:if="{{item.status==5}}">上 课 中</button>
              <view>{{item.status==0?item.deadlineApplyStr+'截止预约':item.status==3?item.deadlineCancelApplyStr+'前可取消':''}}</view>
              <view wx:if="{{item.status==3 || (item.status==1 && item.book==1) || item.status==4 || (item.status==5 && item.book==1)}}" class="inputGroup" data-item="{{item}}" catchtap="groupCodeView">
                <text>进群上课</text>
              </view>
            </view>
          </view>
        </view>
        <view class="card_bottom">
          <view class="signUp_bottom">
            <text>报名人数：{{item.students.length}}/{{item.totalNum}}</text>
            <image wx:for="{{item.students}}" wx:for-item="el" wx:key="*this" src="{{el.userAvatar}}"></image>
          </view>
        </view>
      </view>
      </view>
      <view class="noneCrad" wx:else>暂无课程~</view>
    </view>
  </view>
</view>

<view class="common_fix common_back" hidden="{{!showBack}}" bindtap="toTop">
	<text class="icon icon-toTop"></text>
</view>
<popupCode methodView="{{methodView}}" show="{{showCode}}" bind:close="closeCode" headImg="{{headImg}}"></popupCode>
<calendar show="{{showDatePopup}}" bindclose="calendarClose" chackedDate="{{dateActived}}" bindgetCalendarInfo="getCalendarInfo"></calendar>
<personnel show="{{showChildPopup}}" list="{{list}}" bindclose="personnelClose" bindgetChildInfo="getChildInfo"></personnel>


