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

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

parent b062d88b
<template>
<view class="">
<view class="learn-vedio" v-if="isShowVideo">
<view class="uni-padding-wrap uni-common-mt">
<view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc"
......@@ -40,6 +41,7 @@
</view>
</view>
</view>
</view>
<view v-else>
<view class="title">
......@@ -49,6 +51,7 @@
<u-parse :html="CourseSectionlist.content"></u-parse>
</view>
</view>
</view>
</template>
<script>
......@@ -66,11 +69,11 @@
isShowVideo: false,
CourseSectionlist: {name: '', content: ''}, //节信息
list: [
{'title': '第一节', 'intro': '考核规则1:接单及 时率', 'isActive': true},
{'title': '第二节', 'intro': '考核规则1:接单及 时率', 'isActive': false},
{'title': '第三节', 'intro': '考核规则1:接单及 时率', 'isActive': false},
{'title': '第四节', 'intro': '考核规则1:接单及 时率', 'isActive': false},
{'title': '第五节', 'intro': '考核规则1:接单及 时率', 'isActive':false},
{'title': '第一节', 'intro': '考核规则1:接单及 时率', 'isActive': true, "id": 288},
{'title': '第二节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288},
{'title': '第三节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288},
{'title': '第四节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288},
{'title': '第五节', 'intro': '考核规则1:接单及 时率', 'isActive':false, "id": 288},
],
teacher: {
name: "",
......@@ -93,6 +96,9 @@
fullscreenToggle: true //全屏按钮
}
},
params:{
course_id:0,
},
gklog: '',
videoTotalTime: 0,
howTimeToUpdateLearnedStatus: 5, //设置几秒提交一次状态
......@@ -134,6 +140,7 @@
this.getCourseSection({
section_id: e.section_id
})
this.getCapterDetails();
},
onReady: function(res) {
// #ifndef MP-ALIPAY
......@@ -195,6 +202,7 @@
this.section_content = res.data.content;
this.teacher.name = res.data.teachers[0].name;
this.teacher.avatar = res.data.teachers[0].avatar;
this.param.course_id = res.data.course_id;
if (this.isShowVideo) {
let coureWareList = res.data.courseware;
this.courseSrc = coureWareList[0].src;
......@@ -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>
......
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