<!--packageCourse/pages/course/detail/index.wxml-->
|
<view class="contentTabBox">
|
<view class="showInfo">
|
<!-- 基本信息 -->
|
<view class="baseInfoBox" wx:if="{{tabVal == 'base'}}">
|
<view wx:if="{{!courseLoading}}">
|
<view class="ID-State">
|
<text class="ID">ID: {{detail.id}}</text>
|
<t-tag class="margin-16" size='large' wx:if="{{detail.applyState == 'WaitAudit'}}" variant="light" theme="warning">审核中</t-tag>
|
<t-tag class="margin-16" size='large' wx:if="{{detail.applyState == 'Reject'}}" variant="light" theme="danger">未通过</t-tag>
|
<t-tag class="margin-16" size='large' wx:if="{{detail.applyState == 'Normal'}}" variant="light" theme="success">使用中</t-tag>
|
</view>
|
<view class="statics">
|
<view class="classCout">
|
<text>班级总量</text>
|
<text style="color: #ff6d00">{{classCount}}</text>
|
</view>
|
</view>
|
<view class="courseInfo">
|
<view class="intro">
|
<view class="descTitle">课程简介</view>
|
<view class="descCon">{{detail.description}}</view>
|
</view>
|
<view class="bookInfo">
|
<view class="title">课程教材</view>
|
<view class="bookData">
|
<view class="bookText">
|
<text>{{bookData.name}}</text>
|
<text>作者:{{bookData.author}}</text>
|
<text>ISBN:{{bookData.isbn}}</text>
|
</view>
|
<image wx:if="{{bookData.icon}}" class="bookIcon" src="{{bookData.icon}}" mode="" />
|
<image wx:else class="bookIcon" src="/static/images/default-book-img.png" mode="" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="block" wx:if="{{courseLoading}}">
|
<view wx:for="{{4}}" wx:for-item="themeItem" wx:key="index">
|
<view class="demo-section__content">
|
<t-skeleton animation="gradient" theme="text"></t-skeleton>
|
<t-skeleton animation="gradient" theme="paragraph"></t-skeleton>
|
</view>
|
</view>
|
</view>
|
</view>
|
<!-- 班级管理 -->
|
<view class="classBox" wx:else>
|
<view class="header">
|
<t-search style="flex:1" value="{{searchKey}}" bind:clear="changeHandle" bind:submit="changeHandle" placeholder="搜索班级名称" clearable />
|
<t-button bindtap="newClass" size="small" style="margin-left: 15rpx;">开班</t-button>
|
</view>
|
<view class="contentList" wx:if="{{classList.length > 0 && !classLoading}}">
|
<scroll-view class="scroll" class="content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{80}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom">
|
<view slot="refresher" class="refresh-container">
|
<view class="loading">
|
<t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" />
|
</view>
|
</view>
|
<view class="listClass" wx:for="{{classList}}" wx:key="index" data-class-id="{{item.id}}" data-item="{{item}}" bindtap="todetail">
|
<view class="titleBox">
|
<text class="className">{{item.name}}</text>
|
<text class="classId" style="color: #999; font-size: 12px;"> ID: {{item.id}}</text>
|
</view>
|
<view class="infoBox">
|
<text class="classTag" wx:if="{{item.applyState == 'WaitAudit'}}" style="color: #ef9f29">状态: 审核中</text>
|
<text class="classTag" wx:if="{{item.applyState == 'Normal'}}" style="color: #1dbd11">状态: 进行中</text>
|
<text class="classTag" wx:if="{{item.applyState == 'Reject'}}" style="color: red">状态: 未通过</text>
|
<t-icon bindtap="delClass" data-del-id="{{item.id}}" class="delete" wx:if="{{item.applyState == 'Reject'}}" name="delete" color="red" size='18px' />
|
<view wx:if="{{item.applyState == 'Reject'}}" class="reason">
|
<text> 拒绝原因:</text>
|
<t-tag style="margin-left: 0;" bind:tap="showDialog" data-item="{{item}}" class="margin-16 replay" theme="danger">点击查看</t-tag>
|
</view>
|
<!-- <text class="classTag" wx:if="{{item.applyState == 'Reject'}}" style="color: red">拒绝原因:{{ item.reason != '' ? item.reason : '-' }}</text> -->
|
<text class="classTag">班级人数: {{ item.memberCount }} / {{ item.maxUserCount }}</text>
|
<text class="classTag">有效期:{{ item.beginDate }} - {{ item.endDate }}</text>
|
</view>
|
</view>
|
<view class="bottom-loading" wx:if="{{bottomLoading}}">
|
<t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
|
</view>
|
<view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}">
|
<text>没有更多了</text>
|
</view>
|
</scroll-view>
|
</view>
|
<view class="content" wx:if="{{classList.length == 0 && !classLoading}}">
|
<empty />
|
</view>
|
<view class="block" wx:if="{{classLoading}}">
|
<view wx:for="{{4}}" wx:for-item="themeItem" wx:key="index">
|
<view class="demo-section__content">
|
<t-skeleton animation="gradient" theme="text"></t-skeleton>
|
<t-skeleton animation="gradient" theme="paragraph"></t-skeleton>
|
</view>
|
</view>
|
</view>
|
<t-popup visible="{{visible}}" usingCustomNavbar placement="bottom">
|
<view class="block-title">申请开班</view>
|
<view class="block">
|
<view class="classInfo">
|
<view class="c-name">
|
<text>班级名称</text>
|
<t-input value="{{className}}" bindchange="onCourseNameInput" borderless clearable placeholder="请输入班级名称" />
|
</view>
|
<view class="c-desc">
|
<text>班级人数</text>
|
<t-input value="{{count}}" bindchange="onCourseDescInput" borderless placeholder="请输入班级人数" />
|
</view>
|
<view class="c-date">
|
<text>班级有效期</text>
|
<view class="dateBox">
|
<view>
|
<t-input value="{{startTime}}" readonly borderless bindtap="openDateStart" placeholder="请选择开始时间" />
|
<t-calendar visible="{{visibleStart}}" bind:confirm="handleConfirmStart" />
|
</view>
|
<view>~</view>
|
<view>
|
<t-input value="{{endTime}}" readonly borderless bindtap="openDateEnd" placeholder="请选择结束时间" />
|
<t-calendar visible="{{visibleEnd}}" bind:confirm="handleConfirmEnd" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="classSubmit">
|
<t-button style="padding: 0 25px; margin:0 15px;" size="small" bindtap="cancle" variant="outline">取消</t-button>
|
<t-button style="padding: 0 25px; margin:0;" size="small" bindtap="submitClass">确认</t-button>
|
</view>
|
</view>
|
</t-popup>
|
<t-dialog visible="{{showContentOnly}}" bind:confirm="closeDialog" close-on-overlay-click>
|
<view slot="content" class="reasonContent">
|
{{reason}}
|
</view>
|
<view slot="confirm-btn" style="width: 100%;">
|
<t-button style="color: #ff6d00;border-top: 1px solid #eee ;" variant="text" bindtap="closeDialog" size="large" block t-class="external-class">知道了</t-button>
|
</view>
|
</t-dialog>
|
</view>
|
</view>
|
<view class="tabbar-bottom">
|
<view class="{{tabVal == 'base'?'tab-pubItem activeTab':'tab-pubItem'}}" data-str="base" bindtap="tabActive">
|
<t-icon class="tabIcon" name="home" size="24px" />
|
<text class="text">基本信息</text>
|
</view>
|
<view class="{{tabVal == 'class'?'tab-pubItem activeTab':'tab-pubItem'}}" data-str="class" bindtap="tabActive">
|
<t-icon class="tabIcon" name="file-setting" size="24px" />
|
<text class="text">班级管理</text>
|
</view>
|
</view>
|
</view>
|