|
@ -6,11 +6,10 @@ |
|
|
:enable-progress-gesture="false" |
|
|
:enable-progress-gesture="false" |
|
|
:poster="`${video}?x-oss-async-process=video/snapshots,ss_1100,f_jpg`"></video> |
|
|
:poster="`${video}?x-oss-async-process=video/snapshots,ss_1100,f_jpg`"></video> |
|
|
<image v-else-if="!video && info && info.cover" :src="info.cover" class="video" mode="aspectFill"/> |
|
|
<image v-else-if="!video && info && info.cover" :src="info.cover" class="video" mode="aspectFill"/> |
|
|
<cover-view class="cover-wrap"/> |
|
|
|
|
|
<cover-view class="cover"> |
|
|
|
|
|
<cover-view class="learn" v-if="video">继续学习</cover-view> |
|
|
|
|
|
<!-- <cover-view class="last">上次学到:基础知识</cover-view>--> |
|
|
|
|
|
</cover-view> |
|
|
|
|
|
|
|
|
<!-- <cover-view class="cover" v-if="video" @click="onPlay">--> |
|
|
|
|
|
<!-- <cover-view class="learn">继续学习</cover-view>--> |
|
|
|
|
|
<!-- <!– <cover-view class="last">上次学到:基础知识</cover-view>–>--> |
|
|
|
|
|
<!-- </cover-view>--> |
|
|
</view> |
|
|
</view> |
|
|
<!-- 选项卡 --> |
|
|
<!-- 选项卡 --> |
|
|
<view class="layout-tab" v-if="!matchId"> |
|
|
<view class="layout-tab" v-if="!matchId"> |
|
@ -38,7 +37,8 @@ |
|
|
<!-- </scroll-view>--> |
|
|
<!-- </scroll-view>--> |
|
|
<!-- </view>--> |
|
|
<!-- </view>--> |
|
|
<!-- 课程 --> |
|
|
<!-- 课程 --> |
|
|
<view class="layout-learn" v-if="tabIndex !== 0"> |
|
|
|
|
|
|
|
|
<scroll-view v-if="tabIndex !== 0" scroll-y :style="{height: height}"> |
|
|
|
|
|
<view class="p-20"> |
|
|
<KnowledgeStructure v-if="learnTab === 0" :list="knowledgeStructure"/> |
|
|
<KnowledgeStructure v-if="learnTab === 0" :list="knowledgeStructure"/> |
|
|
<PracticeCourse v-else-if="learnTab === 4" :knowledgeStructure="brushingList" :trainId="trainId"/> |
|
|
<PracticeCourse v-else-if="learnTab === 4" :knowledgeStructure="brushingList" :trainId="trainId"/> |
|
|
<template v-if="learnList.length > 0 && learnTab !== 0 && learnTab !== 4"> |
|
|
<template v-if="learnList.length > 0 && learnTab !== 0 && learnTab !== 4"> |
|
@ -47,8 +47,8 @@ |
|
|
<view class="flex justify-start items-start flex-col"> |
|
|
<view class="flex justify-start items-start flex-col"> |
|
|
<view class="flex justify-between items-center w-100p" |
|
|
<view class="flex justify-between items-center w-100p" |
|
|
@click="knowledge.showChildren = !knowledge.showChildren"> |
|
|
@click="knowledge.showChildren = !knowledge.showChildren"> |
|
|
<text>{{ knowledge.title }}</text> |
|
|
|
|
|
<uv-icon :name="knowledge.showChildren ? 'arrow-down' : 'arrow-up'"/> |
|
|
|
|
|
|
|
|
<text class="text-28 font-bold">{{ knowledge.title }}</text> |
|
|
|
|
|
<uv-icon :name="knowledge.showChildren ? 'arrow-up' : 'arrow-down'"/> |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex flex-col justify-start items-start w-100p" v-if="knowledge.showChildren"> |
|
|
<view class="flex flex-col justify-start items-start w-100p" v-if="knowledge.showChildren"> |
|
|
<view class="p-20 flex flex-col justify-start items-start w-95p" |
|
|
<view class="p-20 flex flex-col justify-start items-start w-95p" |
|
@ -56,7 +56,7 @@ |
|
|
<view class="flex justify-between items-center w-100p" |
|
|
<view class="flex justify-between items-center w-100p" |
|
|
@click="second.showChildren = !second.showChildren"> |
|
|
@click="second.showChildren = !second.showChildren"> |
|
|
<text>{{ second.title }}</text> |
|
|
<text>{{ second.title }}</text> |
|
|
<uv-icon :name="second.showChildren ? 'arrow-down' : 'arrow-up'"/> |
|
|
|
|
|
|
|
|
<uv-icon :name="second.showChildren ? 'arrow-up' : 'arrow-down'"/> |
|
|
</view> |
|
|
</view> |
|
|
<template v-if="second.showChildren"> |
|
|
<template v-if="second.showChildren"> |
|
|
<view class="p-20 flex flex-col justify-start items-start w-95p" |
|
|
<view class="p-20 flex flex-col justify-start items-start w-95p" |
|
@ -64,7 +64,7 @@ |
|
|
<view class="flex justify-between items-center w-100p" |
|
|
<view class="flex justify-between items-center w-100p" |
|
|
@click="third.showChildren = !third.showChildren"> |
|
|
@click="third.showChildren = !third.showChildren"> |
|
|
<text>{{ third.title }}</text> |
|
|
<text>{{ third.title }}</text> |
|
|
<uv-icon :name="third.showChildren ? 'arrow-down' : 'arrow-up'"/> |
|
|
|
|
|
|
|
|
<uv-icon :name="third.showChildren ? 'arrow-up' : 'arrow-down'"/> |
|
|
</view> |
|
|
</view> |
|
|
<template v-if="third.showChildren"> |
|
|
<template v-if="third.showChildren"> |
|
|
<view class="p-20 flex flex-col justify-start items-start w-95p" |
|
|
<view class="p-20 flex flex-col justify-start items-start w-95p" |
|
@ -78,7 +78,7 @@ |
|
|
}} |
|
|
}} |
|
|
</text> |
|
|
</text> |
|
|
</view> |
|
|
</view> |
|
|
<uv-icon :name="forth.showChildren ? 'arrow-down' : 'arrow-up'" |
|
|
|
|
|
|
|
|
<uv-icon :name="forth.showChildren ? 'arrow-up' : 'arrow-down'" |
|
|
v-if="forth.taskList"/> |
|
|
v-if="forth.taskList"/> |
|
|
</view> |
|
|
</view> |
|
|
<template v-if="forth.showChildren"> |
|
|
<template v-if="forth.showChildren"> |
|
@ -120,7 +120,9 @@ |
|
|
item.minMinute |
|
|
item.minMinute |
|
|
}}分钟 |
|
|
}}分钟 |
|
|
</view> |
|
|
</view> |
|
|
<view :class="['state', {ed: item.state === 2}]">已掌握 |
|
|
|
|
|
|
|
|
<view |
|
|
|
|
|
:class="['state', {ed: item.state === 2}]"> |
|
|
|
|
|
已掌握 |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view v-else> |
|
|
<view v-else> |
|
@ -131,7 +133,36 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="mt-20 text-25 text-gray ml-25" |
|
|
<view class="mt-20 text-25 text-gray ml-25" |
|
|
style="margin-left: 90rpx" |
|
|
style="margin-left: 90rpx" |
|
|
v-else>未学习 至少学习{{ item.minMinute }}分钟 |
|
|
|
|
|
|
|
|
v-else>未学习 至少学习{{ |
|
|
|
|
|
item.minMinute |
|
|
|
|
|
}}分钟 |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="learn-item" v-if="forth.hasBrush"> |
|
|
|
|
|
<view class="grad-box"> |
|
|
|
|
|
<view class="grad"> |
|
|
|
|
|
<view class="title"> |
|
|
|
|
|
<view class="icon"> |
|
|
|
|
|
<uv-icon name="edit-pen" size="30rpx"/> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view |
|
|
|
|
|
@click="$jump(`/pages/exam/practice?knowledgeId=${forth.id}&trainId=${trainId}&title=${forth.title}`)" |
|
|
|
|
|
class="font-bold" |
|
|
|
|
|
:class="['text']"> |
|
|
|
|
|
{{ |
|
|
|
|
|
forth.taskList.length + 1 |
|
|
|
|
|
}}、{{ |
|
|
|
|
|
forth.title |
|
|
|
|
|
}}(刷题) |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="explain"> |
|
|
|
|
|
<view class="text text-gray">{{ |
|
|
|
|
|
forth.brushHasDone ? '已刷题' : '未刷题' |
|
|
|
|
|
}} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -148,11 +179,11 @@ |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
<uv-empty v-else-if="learnList.length === 0 && learnTab !== 0"/> |
|
|
<uv-empty v-else-if="learnList.length === 0 && learnTab !== 0"/> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</scroll-view> |
|
|
<TaskIntro v-if="tabIndex === 0" :intro="info.intro"></TaskIntro> |
|
|
<TaskIntro v-if="tabIndex === 0" :intro="info.intro"></TaskIntro> |
|
|
<!-- 底部 --> |
|
|
<!-- 底部 --> |
|
|
<view class="layout-fixed"> |
|
|
|
|
|
|
|
|
<view class="layout-fixed" v-if="!matchId"> |
|
|
<view class="huan" @click="wrongLink"> |
|
|
<view class="huan" @click="wrongLink"> |
|
|
<view class="icon"> |
|
|
<view class="icon"> |
|
|
<uv-image src="/static/image/error.png" width="48rpx" height="48rpx"></uv-image> |
|
|
<uv-image src="/static/image/error.png" width="48rpx" height="48rpx"></uv-image> |
|
@ -176,6 +207,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="popup-btn"> |
|
|
<view class="popup-btn"> |
|
|
<uv-button |
|
|
<uv-button |
|
|
|
|
|
:disabled="clickedAnswerIndex === null" |
|
|
:custom-style="customStyle" |
|
|
:custom-style="customStyle" |
|
|
color="#fff" text="提交" |
|
|
color="#fff" text="提交" |
|
|
@click="handSubmit" |
|
|
@click="handSubmit" |
|
@ -254,11 +286,11 @@ export default { |
|
|
lastLearnTab: 1, |
|
|
lastLearnTab: 1, |
|
|
tabList2: [ |
|
|
tabList2: [ |
|
|
{id: 0, name: '标准'}, |
|
|
{id: 0, name: '标准'}, |
|
|
{id: 1, name: '视频'}, |
|
|
|
|
|
{id: 2, name: '课件'}, |
|
|
|
|
|
{id: 3, name: '教材'}, |
|
|
|
|
|
|
|
|
// {id: 1, name: '视频'}, |
|
|
|
|
|
// {id: 2, name: '课件'}, |
|
|
|
|
|
// {id: 3, name: '教材'}, |
|
|
{id: 4, name: '刷题'}, |
|
|
{id: 4, name: '刷题'}, |
|
|
{id: 5, name: '实训'}, |
|
|
|
|
|
|
|
|
// {id: 5, name: '实训'}, |
|
|
], |
|
|
], |
|
|
learnList: [], |
|
|
learnList: [], |
|
|
learnListInKnowledge: [], |
|
|
learnListInKnowledge: [], |
|
@ -278,13 +310,14 @@ export default { |
|
|
showQaTimer: null, |
|
|
showQaTimer: null, |
|
|
showQaTimerCount: 0, |
|
|
showQaTimerCount: 0, |
|
|
exam: null, |
|
|
exam: null, |
|
|
clickedAnswerIndex: -1, |
|
|
|
|
|
|
|
|
clickedAnswerIndex: null, |
|
|
clickedAnswer: null, |
|
|
clickedAnswer: null, |
|
|
videoContext: null, |
|
|
videoContext: null, |
|
|
resetTimer: true, |
|
|
resetTimer: true, |
|
|
trainId: 0, |
|
|
trainId: 0, |
|
|
matchId: 0, |
|
|
matchId: 0, |
|
|
percentage: 0 |
|
|
|
|
|
|
|
|
percentage: 0, |
|
|
|
|
|
height: 400 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@ -298,6 +331,7 @@ export default { |
|
|
this.videoContext = uni.createVideoContext('myVideo') |
|
|
this.videoContext = uni.createVideoContext('myVideo') |
|
|
if (!this.playing && this.resetTimer) this.timeCount = 0 |
|
|
if (!this.playing && this.resetTimer) this.timeCount = 0 |
|
|
this.playing = true |
|
|
this.playing = true |
|
|
|
|
|
this.videoContext.play() |
|
|
this.setTime() |
|
|
this.setTime() |
|
|
}, |
|
|
}, |
|
|
onEnd() { |
|
|
onEnd() { |
|
@ -309,7 +343,7 @@ export default { |
|
|
if (this.timer) clearInterval(this.timer) |
|
|
if (this.timer) clearInterval(this.timer) |
|
|
}, |
|
|
}, |
|
|
handTab(index) { |
|
|
handTab(index) { |
|
|
this.tabIndex = index |
|
|
|
|
|
|
|
|
if (index < 2) this.tabIndex = index |
|
|
if (index === 4) { |
|
|
if (index === 4) { |
|
|
uni.navigateTo({url: `/pages/promote/wrong`}) |
|
|
uni.navigateTo({url: `/pages/promote/wrong`}) |
|
|
} else if (index === 3) { |
|
|
} else if (index === 3) { |
|
@ -367,6 +401,7 @@ export default { |
|
|
this.timeCount = 0 |
|
|
this.timeCount = 0 |
|
|
this.currentLearningIndex = index |
|
|
this.currentLearningIndex = index |
|
|
this.currentLearningId = id |
|
|
this.currentLearningId = id |
|
|
|
|
|
console.log(this.learnList[index].type) |
|
|
if (this.learnList[index].type === 'video') this.video = this.learnList[index].content |
|
|
if (this.learnList[index].type === 'video') this.video = this.learnList[index].content |
|
|
else if (['file', 'learnFile'].includes(this.learnList[index].type)) this.openFile(this.learnList[index].content) |
|
|
else if (['file', 'learnFile'].includes(this.learnList[index].type)) this.openFile(this.learnList[index].content) |
|
|
}, |
|
|
}, |
|
@ -643,6 +678,8 @@ export default { |
|
|
console.log(e) |
|
|
console.log(e) |
|
|
}); |
|
|
}); |
|
|
// #endif |
|
|
// #endif |
|
|
|
|
|
if (this.matchId) this.height = (uni.getSystemInfoSync().screenHeight - uni.getSystemInfoSync().safeAreaInsets.top - uni.getSystemInfoSync().statusBarHeight - uni.upx2px(710)) + 'px' |
|
|
|
|
|
else this.height = (uni.getSystemInfoSync().screenHeight - uni.getSystemInfoSync().safeAreaInsets.top - uni.getSystemInfoSync().statusBarHeight - uni.upx2px(920)) + 'px' |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.getKnowledgeStructure(this.courseId) |
|
|
this.getKnowledgeStructure(this.courseId) |
|
@ -687,14 +724,18 @@ page { |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
|
|
|
|
|
|
.learn { |
|
|
.learn { |
|
|
width: 220rpx; |
|
|
|
|
|
height: 72rpx; |
|
|
|
|
|
|
|
|
//width: 220rpx; |
|
|
|
|
|
//height: 72rpx; |
|
|
|
|
|
padding: 15rpx 40rpx; |
|
|
font-size: 28rpx; |
|
|
font-size: 28rpx; |
|
|
line-height: 72rpx; |
|
|
|
|
|
|
|
|
//line-height: 72rpx; |
|
|
color: #fff; |
|
|
color: #fff; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
border-radius: 36rpx; |
|
|
border-radius: 36rpx; |
|
|
background: #00b6ff; |
|
|
background: #00b6ff; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.last { |
|
|
.last { |
|
@ -818,7 +859,7 @@ page { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.layout-learn { |
|
|
.layout-learn { |
|
|
padding: 0 30rpx 150rpx; |
|
|
|
|
|
|
|
|
padding: 0 30rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.learn-item { |
|
|
.learn-item { |
|
|