Commit 80cdc868 authored by 林文清's avatar 林文清

学习视频详情,少了个view标签

parent b062d88b
<template> <template>
<view class="">
<view class="learn-vedio" v-if="isShowVideo"> <view class="learn-vedio" v-if="isShowVideo">
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc" <view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc"
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<view v-else> <view v-else>
<view class="title"> <view class="title">
...@@ -49,6 +51,7 @@ ...@@ -49,6 +51,7 @@
<u-parse :html="CourseSectionlist.content"></u-parse> <u-parse :html="CourseSectionlist.content"></u-parse>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -66,11 +69,11 @@ ...@@ -66,11 +69,11 @@
isShowVideo: false, isShowVideo: false,
CourseSectionlist: {name: '', content: ''}, //节信息 CourseSectionlist: {name: '', content: ''}, //节信息
list: [ list: [
{'title': '第一节', 'intro': '考核规则1:接单及 时率', 'isActive': true}, {'title': '第一节', 'intro': '考核规则1:接单及 时率', 'isActive': true, "id": 288},
{'title': '第二节', 'intro': '考核规则1:接单及 时率', 'isActive': false}, {'title': '第二节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288},
{'title': '第三节', 'intro': '考核规则1:接单及 时率', 'isActive': false}, {'title': '第三节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288},
{'title': '第四节', 'intro': '考核规则1:接单及 时率', 'isActive': false}, {'title': '第四节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288},
{'title': '第五节', 'intro': '考核规则1:接单及 时率', 'isActive':false}, {'title': '第五节', 'intro': '考核规则1:接单及 时率', 'isActive':false, "id": 288},
], ],
teacher: { teacher: {
name: "", name: "",
...@@ -93,6 +96,9 @@ ...@@ -93,6 +96,9 @@
fullscreenToggle: true //全屏按钮 fullscreenToggle: true //全屏按钮
} }
}, },
params:{
course_id:0,
},
gklog: '', gklog: '',
videoTotalTime: 0, videoTotalTime: 0,
howTimeToUpdateLearnedStatus: 5, //设置几秒提交一次状态 howTimeToUpdateLearnedStatus: 5, //设置几秒提交一次状态
...@@ -134,6 +140,7 @@ ...@@ -134,6 +140,7 @@
this.getCourseSection({ this.getCourseSection({
section_id: e.section_id section_id: e.section_id
}) })
this.getCapterDetails();
}, },
onReady: function(res) { onReady: function(res) {
// #ifndef MP-ALIPAY // #ifndef MP-ALIPAY
...@@ -195,6 +202,7 @@ ...@@ -195,6 +202,7 @@
this.section_content = res.data.content; this.section_content = res.data.content;
this.teacher.name = res.data.teachers[0].name; this.teacher.name = res.data.teachers[0].name;
this.teacher.avatar = res.data.teachers[0].avatar; this.teacher.avatar = res.data.teachers[0].avatar;
this.param.course_id = res.data.course_id;
if (this.isShowVideo) { if (this.isShowVideo) {
let coureWareList = res.data.courseware; let coureWareList = res.data.courseware;
this.courseSrc = coureWareList[0].src; this.courseSrc = coureWareList[0].src;
...@@ -260,7 +268,38 @@ ...@@ -260,7 +268,38 @@
}); });
}); });
} }
},
//获取章节详情
getCapterDetails() {
console.log('获取章节详情')
this.$u.api
.ChapterDetails(this.params)
.then((res) => {
if (res.code == 200) {
if (res.data) {
debugger
this.list = this.list.concat(res.data);
console.log(this.list)
} }
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none"
});
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment