Task.wxml
3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!--packageStudyCenter/pages/myTask/components/Task/Task.wxml-->
<view class="task-box">
<view class="tab-box">
<view class="tab-list">
<view
wx:for="{{tabList}}"
wx:key="index"
class="tab-item {{tabIndex === index ? 'active' : ''}}"
bindtap="handleTabClick"
data-index="{{index}}"
>
<view class="tab-item-title">{{item}}</view>
</view>
</view>
<view class="finish-tab" wx:if="{{tabIndex === 1}}">
<view
class="finish-tab-item {{finishIndex === 2 ? 'finish-active' : ''}}"
bindtap="handleFinishTabClick"
data-index="2"
>
长课程
</view>
<view
class="finish-tab-item {{finishIndex === 1 ? 'finish-active' : ''}}"
bindtap="handleFinishTabClick"
data-index="1"
>
短课程
</view>
</view>
</view>
<view class="tips" wx:if="{{tabIndex === 0}}">
<image class="icon-study-tips" src="{{IMG_URL}}studyCenter/warning.png" mode=""/>
<view class="tips-text">带有"限时学"标签的课程:规定时间内未完成任务,禁止提单!请按时学习。</view>
</view>
<block wx:if="{{taskList.length}}">
<view class="task-list">
<view
class="task-item"
wx:for="{{taskList}}"
wx:key="index"
bindtap="handleTaskItemClick"
data-item="{{item}}"
>
<card-item infoData="{{item}}" formItems="{{ item.courseType == 2 ? formItems : slitFormItems}}" customTop="{{true}}">
<view class="time-limit-tag" wx:if="{{tabIndex === 0 && item.punishType == 1}}"></view>
<view class="time-limit-countdown" wx:if="{{tabIndex === 0 && item.punishType == 1}}">
<block wx:if="{{item._timeout}}">
<view class="countdown-label timeout-label">已超时</view>
</block>
<block wx:elif="{{item._showCountdown}}">
<view class="countdown-label">剩</view>
<view class="countdown-num">{{item._countdownHour}}</view>
<view class="countdown-separator">:</view>
<view class="countdown-num">{{item._countdownMinute}}</view>
<view class="countdown-separator">:</view>
<view class="countdown-num">{{item._countdownSecond}}</view>
</block>
<block wx:elif="{{item._showDays}}">
<view class="countdown-label">剩</view>
<view class="countdown-num">{{item._leftDays < 10 ? '0' + item._leftDays : item._leftDays}}</view>
<view class="countdown-label">天</view>
</block>
<block wx:else>
<view class="countdown-label">剩</view>
<view class="countdown-num">--</view>
<view class="countdown-separator">:</view>
<view class="countdown-num">--</view>
<view class="countdown-separator">:</view>
<view class="countdown-num">--</view>
</block>
</view>
<image
class="task-item-img"
src="{{item.courseType === 1 ? IMG_URL + 'studyCenter/short-course-default.png' : IMG_URL + 'studyCenter/course-default-bg.png'}}"
mode="aspectFill"
/>
</card-item>
</view>
</view>
</block>
<block wx:else>
<view class="nothing flex">
<image class="icon" src="{{IMG_URL}}studyCenter/empty_data.png" />
暂无数据
</view>
</block>
<view class="end-text" wx:if="{{nothing && taskList.length}}">到底了!</view>
</view>