<!-- index.wxml -->
<!-- <StatusBar receiveData="{{statusbarobj}}" grade="{{grade}}" bindgradeTap="gradeTap" /> -->
<view class="change_grade" wx:if="{{isGradeShow}}">
  <view class="change_brage_wrapper">
    <text class="title">分龄选择</text>
    <view class="change_row">
      <view class="change_item" bindtap="changeGrade" data-code="PRIMARY_FIRST_GRADE">一年级</view>
      <view class="change_item" bindtap="changeGrade" data-code="PRIMARY_SECOND_GRADE">二年级</view>
    </view>
    <view class="change_row">
      <view class="change_item" bindtap="changeGrade" data-code="PRIMARY_THREE_GRADE">三年级</view>
      <view class="change_item" bindtap="changeGrade" data-code="PRIMARY_SENIOR_GRADE">四年级</view>
    </view>
    <view class="change_row change_row_single">
      <view class="change_item" bindtap="changeGrade" data-code="PRESCHOOL">学前班</view>
      <view class="change_item change_item_blank" data-code="PRESCHOOL"></view>
    </view>
  </view>
</view>
<view class="container">
  <!-- 引入组件 -->
  <!-- <import src="/component/group/group.wxml" /> -->
  <!-- <import src="/component/hot/hot.wxml" /> -->
  <!-- <import src="/component/follow/follow.wxml" /> -->
  <import src="/component/my/my.wxml" />
  <import src="/templates/courses/courses.wxml" />
  <!-- 顶部导航 -->
  <view class="top-tab" wx:if="{{!isGradeShow}}">
    <!-- <block wx:for="{{tab}}" wx:key="index">
      <view class="tabbar {{index == myIndex ? 'select':' '}}" bindtap="switcher" data-index="{{index}}">
        <text>{{item.name}}</text>
      </view>
    </block> -->
    <view class="tabbar {{3 == myIndex ? 'select':' '}}" bindtap="switcher" data-index="3">
      <text>我的</text>
    </view>
    <view class="tabbar {{0 == myIndex ? 'select':' '}}" bindtap="switcher" data-index="0">
      <text>推荐</text>
    </view>
    <view class="tabbar {{1 == myIndex ? 'select':' '}}" bindtap="switcher" data-index="1">
      <text>关注</text>
    </view>
    <view class="tabbar {{2 == myIndex ? 'select':' '}}" bindtap="switcher" data-index="2">
      <text>资源</text>
    </view>
  </view>
  <!-- 调用组件 -->
  <template is="{{templates}}" wx:if="{{myIndex === 3 || myIndex === 2}}" data="{{myData: myData,coursesData:coursesData,noMoreWork:noMoreWork}}"></template>
  <VideoSwiper wx:if="{{videoList.length > 0}}" class="video-swiper" video-list="{{videoList}}" nextMargin="{{nextMargin}}" isSwiper="{{isSwiper}}" noMoreWork="{{noMoreWork}}" ifHeadTap="{{true}}" bindopenShare="openShare" bindopenComment="openComment" bindheadTap="headTapHandler" bindgoToReading="goToReading" bindcollectTap="collectTap" bindlikeTap="likeTap" binddelHideMyWork="delHideMyWork" bindaddShareAmount="addShareAmount" bindchange="videoChange">
    <!-- bindplay="onPlay"
  bindpause="onPause"
  bindtimeupdate="onTimeUpdate"
  bindended="onEnded"
  binderror="onError"
  bindwaiting="onWaiting"
  bindprogress="onProgress"
  bindloadedmetadata="onLoadedMetaData" -->
  </VideoSwiper>
  <view class="comment_section" catchtouchmove="touchMove" catchtap="commentTap" data-type="blank" wx:if="{{commentShow}}">
    <Comment data-type="list" commentId="{{commentId}}" commentNum="{{commentNum}}" inputValue="{{inputValue}}" bindsendReply="sendReply" />
  </view>
  <view class="no_follow" wx:if="{{myIndex === 1 && videoList.length <= 0 && noFollow}}">
    <image class="no_follow_icon" src="../../static/index/no_follow.png" />
    <text>赶快去关注优秀作者吧,</text>
    <text>这里将会发生欣喜的变化。</text>
  </view>
</view>
<!-- <MyToast /> -->
<view hidden="{{hide}}">
  <Dialog bindmyevent="jurisdiction" />
</view>
<view class="upgrade" hidden="{{upgradeHide}}">
  <view class="upgrade-main">
    <image class="upgrade-icon" src="https://reader-wx.ai160.com/images/reader/upgrade_success.png"></image>
    <image class="close" bindtap="hideUpgrade" src="../../static/image/close.png"></image>
  </view> 
</view>
<shareDialog id="share-dialog" shareType='works' bindaddShareAmount="addShareAmount" bindShareDialogClose="shareDialogClose" shareId="{{id}}" />
<canvas canvas-id="myCanvas" style="width:300px; height: 525px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
<!-- <view class="index-dialog" wx:if="{{indexSignDialog}}">
  <form bindsubmit="signInBtn" report-submit="{{true}}" class="index-dialog-wrapper" >
    <view class="index-dialog-text">签到领取小红花哦</view>
    <view class="index-dialog-btn" >去签到</view>
    <button class="index-dialog-btn-hide" form-type="submit"></button>
  </form>
</view> -->
<!-- <view class="index-dialog" wx:if="{{indexMissionDialog}}">
  <view class="index-dialog-wrapper" bindtap="missionBtn" >
    <view class="index-dialog-text">还有<text class="red-text">{{unfinishedCount}}</text>个小红花任务哦</view>
    <view class="index-dialog-btn" >查看任务</view>
  </view>
</view> -->