|
|
<!-- 下滑刷新 -->
|
|
|
<view class="container">
|
|
|
<view class="subtitle-text">又是美好的一天,学习正当时</view>
|
|
|
<!-- 轮播图 -->
|
|
|
<view class="swiper-container">
|
|
|
<swiper style="height: 100%;" indicator-dots indicator-color="white" indicator-active-color="gray" autoplay interval="2000" circular>
|
|
|
<!-- 第1个 -->
|
|
|
<swiper-item>
|
|
|
<image src="/images/home/book1.jpg" class="swiper-image" mode="widthFix"></image>
|
|
|
</swiper-item>
|
|
|
<!-- 第2个 -->
|
|
|
<swiper-item>
|
|
|
<image src="/images/home/book2.jpg" class="swiper-image" mode="widthFix"></image>
|
|
|
</swiper-item>
|
|
|
<swiper-item>
|
|
|
<image src="/images/home/book3.jpg" class="swiper-image" mode="widthFix"></image>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
|
<view class="course-list">
|
|
|
<view class="course-item" bind:tap="MyTeach">
|
|
|
<image src="/images/home/class-teacher.png" mode="heightFix" class="png"></image>
|
|
|
<view class="course-title">我教的课</view>
|
|
|
</view>
|
|
|
<view class="course-item" bind:tap="MyLearn">
|
|
|
<image src="/images/home/class-student.png" mode="heighFix" class="png"></image>
|
|
|
<view class="course-title">我听的课</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<button hidden="{{!(Show && ! IsStudent)}}" class="NewLesson" bind:tap="AddNewLesson"><text>+ 新建课程</text>
|
|
|
</button>
|
|
|
<!-- 滑动列表-->
|
|
|
<view wx:if="{{Show}}" class="category-contanier">
|
|
|
<!-- 根据identify的值,决定展现哪一个滚动列表.IsStudent由identify决定 -->
|
|
|
<!-- 老师 -->
|
|
|
<view wx:if="{{!IsStudent}}" class="lessonlist" >
|
|
|
<block wx:for="{{Lesson_list}}" wx:key="id">
|
|
|
<view class="list_container">
|
|
|
<!-- 课程名 -->
|
|
|
<image src="/images/upteach/blackboard.png" class="blackboard" mode="widthFix"></image>
|
|
|
<view class="li-item-father" bindtap="GetInLesson_Teacher" data-index="{{index}}">
|
|
|
<text class="li-name">{{item.lesson_name}}</text>
|
|
|
<!-- 课程状态:如果对应的status=0,未上课。不加粗 -->
|
|
|
<view wx:if="{{item.status === 0}}" class="li-item">
|
|
|
<text class="li-status">未上课</text>
|
|
|
</view>
|
|
|
<!-- 如果对应的status=1,上课中。加粗显示 -->
|
|
|
<view wx:if="{{item.status === 1}}" class="li-item">
|
|
|
<text class="li-status">上课中...</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
<!--学生 -->
|
|
|
<scroll-view wx:if="{{IsStudent}}" class="lessonlist" scroll-y>
|
|
|
<block wx:for="{{Lesson_list}}" wx:key="id">
|
|
|
<view class="list_container">
|
|
|
<!-- 课程名 -->
|
|
|
<image src="/images/upteach/blackboard.png" class="blackboard" mode="widthFix"></image>
|
|
|
<view class="li-item-father" bindtap="GetInLesson_Student" data-index="{{index}}">
|
|
|
<text class="li-name">{{item.lesson_name}}</text>
|
|
|
<!-- 课程状态:如果对应的status=0,未上课。不加粗 -->
|
|
|
<view wx:if="{{item.status === 0}}" class="li-item">
|
|
|
<text class="li-status">未上课</text>
|
|
|
</view>
|
|
|
<!-- 如果对应的status=1,上课中。加粗显示 -->
|
|
|
<view wx:if="{{item.status === 1}}" class="li-item">
|
|
|
<text class="li-status">上课中...</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</view> |