You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
3.7 KiB
85 lines
3.7 KiB
<wxs src="./path.wxs" module="handler" />
|
|
<view class="header">
|
|
<require-login bg="#00b0f0" bindchange="pullSubject"/>
|
|
<view class="title">
|
|
{{subject.name}}
|
|
</view>
|
|
<view class="subject-detail">
|
|
<view class="detail-item">
|
|
<view class="key">章节</view>
|
|
<view class="value">{{subject.stages_count}}</view>
|
|
</view>
|
|
<view class="detail-item">
|
|
<view class="key">实训</view>
|
|
<view class="value">{{subject.shixuns_count}}</view>
|
|
</view>
|
|
<view class="detail-item">
|
|
<view class="key">关卡</view>
|
|
<view class="value">{{subject.challenges_count}}</view>
|
|
</view>
|
|
<view class="detail-item">
|
|
<view class="key">经验值</view>
|
|
<view class="value">{{subject.subject_score}}</view>
|
|
</view>
|
|
<view class="detail-item">
|
|
<view class="key">学习人数</view>
|
|
<view class="value">{{subject.member_count}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="progress-wrp">
|
|
<progress class="score-progress" stroke-width="9" percent="{{progress.my_score/progress.all_score*100}}" border-radius="10" backgroundColor="#dddddd" activeColor="#00b0f0">
|
|
<text class="score">已学:{{progress.my_score}}/{{progress.all_score}}</text>
|
|
</progress>
|
|
</view>
|
|
</view>
|
|
|
|
<nav-bar bar-class="nav-bar" bindchange="onSwitch" current="{{current}}" type="line" list="{{cates}}" />
|
|
<swiper class="body" current="{{current}}" bindchange="onSwitch">
|
|
<swiper-item>
|
|
<scroll-view class="cate-body" scroll-y="1" bindscroll="{{handler.scroll}}">
|
|
<view class="stages-list">
|
|
<view class="stage" wx:for="{{stages}}" wx:for-item="stage" wx:key="stage_id">
|
|
<view class="stage_name cate-header">
|
|
<text class="square"/><text class="cate-name">{{stage.stage_name}}</text>
|
|
</view>
|
|
<view class="shixuns-list">
|
|
<navigator class="shixun {{shixun.allow_visit?'':'forbidden'}}" hover-class="{{shixun.allow_visit?'navigator-hover':'none'}}"
|
|
wx:for="{{stage.shixuns_list}}" wx:for-item="shixun" wx:key="identifier"
|
|
url="{{shixun.allow_visit?('/shixun/pages/shixun/shixun?identifier='+shixun.identifier):''}}"
|
|
data-allow_visit="{{shixun.allow_visit}}" bindtap="onEnterShixun">
|
|
<icon wx:if="{{shixun.complete_status}}" type="success" class="shixun-icon" size="18" color="#00b0f0"/>
|
|
<mp-icon wx:else extClass="shixun-icon" icon="play2" size="18" color="#dedede" type="field"/>
|
|
<view class="shixun-name">
|
|
<text class="shixun-index">{{stage.stage_position}}-{{index+1}}</text>
|
|
{{shixun.shixun_name}}
|
|
</view>
|
|
</navigator>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</swiper-item>
|
|
<swiper-item>
|
|
<scroll-view class="cate-body" scroll-y="1" bindscroll="{{handler.scroll}}">
|
|
<view class="cate-header">
|
|
<text class="square"/><text class="cate-name">简介</text>
|
|
</view>
|
|
<rich-md nodes="{{subject.description}}" type="markdown" />
|
|
<view class="cate-header">
|
|
<text class="square"/><text class="cate-name">课程须知</text>
|
|
</view>
|
|
<rich-md nodes="{{subject.learning_notes}}" type="markdown" />
|
|
<view class="cate-header">
|
|
<text class="square"/><text class="cate-name">技能标签</text>
|
|
</view>
|
|
<view class="tags-list">
|
|
<view class="tag {{item.status?'active':''}}" wx:for="{{tags}}">
|
|
{{item.tag_name}}
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</swiper-item>
|
|
</swiper>
|
|
<view class="operations">
|
|
<button type="main" plain bindtap="collect" class="collect">{{subject.is_collect?'已收藏':'收藏'}}</button>
|
|
</view> |