learningCenter.wxml 3.85 KB
<!--pages/tab/learningCenter/learningCenter.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" bindnavbarReady="navbarReady" bindback="back" navStyle="background-color:transparent;box-shadow:none;">
    <view>学习中心</view>
  </navigation-bar>
</block>
<view class="bg"></view>
<view class="container" style="padding-top: {{navBarHeight}}px;">
	<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}}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="/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}}arrow-down.png" mode=""/>
				</view>
				<view class="item" bindtap="handleCategory">
					<view class="text">{{categoryObj.label || '全部课程'}}</view>
					<image class="icon" src="{{IMG_URL}}arrow-down.png" mode=""/>
				</view>
				<view class="item" bindtap="handleScreen">
					<view class="text">筛选</view>
					<image class="icon" src="{{IMG_URL}}screen-icon.png" mode=""/>
				</view>
			</view>
			<view class="total">共{{total}}门课程</view>
		</view>
	</view>
	<scroll-view scroll-y enhanced="{{true}}" style="height: calc(100% - 284rpx);" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" class="list" bindscroll="onScroll" bindscrolltolower="scrollonReachBottom" >
		<view class="all-box">
			<view class="all-list">
				<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}}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>
</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>