studyCenter.wxml
7.05 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!--packageStudyCenter/pages/studyCenter/studyCenter.wxml-->
<block wx:if="{{showScreen}}">
<navigation-bar showBack bindnavbarReady="navbarReady" class="navigation-header" bindback="containerBack" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar>
</block>
<block wx:elif="{{showCategory}}">
<navigation-bar showBack bindnavbarReady="navbarReady" class="navigation-header" bindback="containerCategoryBack" navStyle="background-color:#fff;box-shadow:none;">全部课程</navigation-bar>
</block>
<block wx:else>
<navigation-bar class="navigation-header" showBack bindnavbarReady="navbarReady" bindback="back" navStyle="background-color:#fff;box-shadow:none;">
<view>学习中心</view>
</navigation-bar>
</block>
<scroll-view scroll-y bindscroll="onPageScroll" scroll-top="{{setScrollTop}}" enhanced="{{true}}" show-scrollbar="{{false}}" class="container" bindscrolltolower="scrollonReachBottom" style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px);">
<view class="box top-box">
<view class="title">我的学习时长</view>
<view class="time-box">
<view class="item">
<view class="tap">累计</view>
<view class="time-content">
<view class="time">{{statisticsData.totalHour != null ? statisticsData.totalHour : '-'}}<text class="unit">小时</text></view>
</view>
</view>
<view class="item">
<view class="tap">本月</view>
<view class="time-content">
<view class="time">{{statisticsData.monHour != null ? statisticsData.monHour : '-'}}<text class="unit">小时</text></view>
<view class="ring">
对比上月
<block wx:if="{{statisticsData.monHourRatio != null}}">
<view class="rate {{statisticsData.monHourRatio > 0 ? 'up' : statisticsData.monHourRatio < 0 ? 'down' : ''}}">
{{statisticsData._monHourRatio}}%
</view>
</block>
<block wx:else>
<view class="rate">-</view>
</block>
<image class="icon" src="{{IMG_URL}}studyCenter/{{statisticsData.monHourRatio > 0 ? 'up' : statisticsData.monHourRatio < 0 ? 'down' : 'stay'}}.png" mode=""/>
</view>
</view>
</view>
</view>
</view>
<view class="box menu">
<view class="menu-item" wx:for="{{menuList}}" wx:key="index" bindtap="navGo" data-item="{{item}}">
<view class="icon">
<image src="{{ IMG_URL}}studyCenter/{{item.icon}}.png" />
</view>
<view class="text">{{item.name}}</view>
<view class="hot_icon" wx:if="{{ item.tipsFlag && statisticsData.unReadCount }}"></view>
</view>
</view>
<view class="ing-box">
<view class="title">
正在学习
<view class="text-btn" bindtap="goPage">
查看全部
<image class="icon" src="{{IMG_URL}}studyCenter/arrow-right.png" mode=""/>
</view>
</view>
<view class="tips-box">
本周学习时长{{statisticsData.weekHour != null ? statisticsData.weekHour : '-'}}小时
</view>
<block wx:if="{{myCourseList.length}}">
<scroll-view scroll-x enhanced="{{true}}" show-scrollbar="{{false}}">
<view class="studying-box">
<view class="studying-item" bindtap="goBeisenDetail" data-target="{{item}}" wx:for="{{myCourseList}}" wx:key="index">
<card-item infoData="{{item}}" formItems="{{formItems}}"></card-item>
</view>
</view>
</scroll-view>
</block>
<block wx:else>
<view class="nothing">
<image class="icon" src="{{IMG_URL}}studyCenter/empty_data.png" />
暂无数据
</view>
</block>
</view>
<view class="all-box">
<view class="sticky-box">
<view class="title">全部课程</view>
<view class="search-box">
<view class="search-input">
<view class="placeholder-area" wx:if="{{!searchTitle}}">
<image
src="{{IMG_URL}}studyCenter/search-icon.png"
class="search-icon"
/>
<text class="placeholder-text">搜索课程</text>
</view>
<input
type="text"
class="input"
value="{{searchTitle}}"
placeholder-class="input-placeholder"
bindinput="searchInput"
bindconfirm="search" />
<block wx:if="{{ searchTitle }}">
<image src="{{ IMG_URL }}images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
</view>
<view class="screen-box">
<view class="left">
<view class="item" bindtap="handleSort">
<view class="text">{{sortObj.id !== '' ? sortObj.label : '最多人学'}}</view>
<image class="icon" src="{{IMG_URL}}studyCenter/arrow-down.png" mode=""/>
</view>
<view class="item" bindtap="handleCategory">
<view class="text">{{categoryObj.label || '全部课程'}}</view>
<image class="icon" src="{{IMG_URL}}studyCenter/arrow-down.png" mode=""/>
</view>
<view class="item" bindtap="handleScreen">
<view class="text">筛选</view>
<image class="icon" src="{{IMG_URL}}studyCenter/screen-icon.png" mode=""/>
</view>
</view>
<view class="total">共{{total}}门课程</view>
</view>
</view>
<view class="all-list" style="min-height: calc(100vh - {{fixedHeight}}px - {{navBarHeight}}px);">
<block wx:if="{{allList.length}}">
<view class="list-box">
<block wx:for="{{allList}}" wx:key="index">
<view class="all-item" bindtap="goBeisenDetail" data-target="{{item}}">
<card-item infoData="{{item}}" formItems="{{allFormItems}}"></card-item>
</view>
</block>
</view>
</block>
<block wx:else>
<view class="nothing" style="height: calc(100vh - {{fixedHeight}}px - {{navBarHeight}}px);">
<image class="icon" src="{{IMG_URL}}studyCenter/empty_data.png" />
暂无数据
</view>
</block>
<block>
<view class="end-text" wx:if="{{loadingList}}">更多课程加载中...</view>
<view class="end-text" wx:if="{{nothing && allList.length && !loading}}">更多课程即将上架,敬请期待</view>
</block>
</view>
</view>
</scroll-view>
<sort-popup show="{{showSortPopup}}" title="综合排序" bindconfirm="sortConfirm" bindcancel="sortCancel" activeId="{{sortObj.id}}"></sort-popup>
<page-container show="{{ showCategory || showScreen }}" duration="{{ 0 }}" overlay="{{ false }}">
<view wx:if="{{ showCategory }}">
<category-screen show="{{ showCategory }}" activeId="{{categoryObj.id}}" navBarHeight="{{ navBarHeight }}" bindconfirm="searchCategoryScreen" />
</view>
<view wx:if="{{ showScreen }}">
<list-screen show="{{ showScreen }}" navBarHeight="{{ navBarHeight }}" screenObj="{{screenObj}}" bindconfirm="searchScreen" />
</view>
</page-container>
<study-permission-modal id="customModal" />
<exam-submit-popup id="examPopup" bindcancel="examHandleCancel" bindconfirm="examHandleConfirm" examSubmitText="{{examSubmitText}}" />