<view class="content">
  <view class="headImg paddingBox">
    <image src="{{leaderInfo.avatar}}" mode="widthFix"></image>
  </view>
  <view class="brief_introduction paddingBox">
    <view class="leader_name">{{param.teacherName}} <text>（ {{param.teacherCity}} ）</text></view>
    <view class="instruct">{{leaderInfo.intro}}</view>
  </view>
  <view class="leader item paddingBox">
    <view class="basic_information item" wx:if="{{leaderInfo.job || leaderInfo.school || leaderInfo.experience || leaderInfo.honor}}">
      <view class="info_item1 public" wx:if="{{leaderInfo.job}}">
        <text></text>
        <text>{{leaderInfo.job}}</text>
      </view>
      <view class="info_item2 item public" wx:if="{{leaderInfo.school}}">
        <text></text>
        <text>{{leaderInfo.school}}</text>
      </view>
      <view class="info_item3 item public" wx:if="{{leaderInfo.experience}}">
        <text></text>
        <text>{{leaderInfo.experience}}</text>
      </view>
      <view class="info_item4 item public" wx:if="{{leaderInfo.honor}}">
        <text></text>
        <text>{{leaderInfo.honor}}</text>
      </view>
    </view>
  </view>
  <view class="detail_Info paddingBox">
    <view class="flexBox tabSelect {{fixTop?'fixed_Top':''}}">
      <view class="tab-item {{currentIndex == 1 ? ' active':''}}" data-index="1" bindtap="setTabbar" wx:if="{{leaderInfo.videos.length>0 || leaderInfo.pics.length>0}}">
        <view class="label">带队风采</view>
      </view>
      <view class="tab-item {{currentIndex == 2 ? ' active':''}}" data-index="2" bindtap="setTabbar">
        <view class="label">课程预约</view>
      </view>
    </view>
    <view class="tab_content">
      <view class="tab_article" wx:if="{{currentIndex==1}}">
        <view class="Source" wx:for="{{leaderInfo.videos}}" wx:key="index">
          <video src="{{item}}" custom-cache="{{false}}"></video>
        </view>
        <view class="Source" wx:for="{{leaderInfo.pics}}" wx:key="index">
          <image src="{{item}}" mode="widthFix"></image>
        </view>
      </view>
      <view class="tab_date" wx:if="{{currentIndex==2}}">
        <view style="overflow:hidden">
          <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="curriculum_list">
          <view wx:if="{{cardList.length>0}}">
            <view class="card" wx:for="{{cardList}}" wx:key="index">
            <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 == 1 || currentIndex == 2)?'已 结 束':'已 评 价'}}</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}}" bindtap="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="index" src="{{el.userAvatar}}"></image>
              </view>
            </view>
          </view>
          </view>
          <view class="noneCrad" wx:else>暂无课程~</view>
        </view>
      </view>
      
    </view>
  </view>
</view>
<view class="common_fix common_back" hidden="{{!showBack}}" bindtap="toTop">
	<text class="icon icon-toTop"></text>
</view>
<calendar show="{{showDatePopup}}" leaderUid="{{param.teacherUid}}" bindclose="calendarClose" chackedDate="{{dateActived}}" bindgetCalendarInfo="getCalendarInfo"></calendar>
<popupCode methodView="{{methodView}}" show="{{showCode}}" bind:close="closeCode" headImg="{{headImg}}"></popupCode>
