Commit 859da9d8 authored by 张伯涛's avatar 张伯涛

bug修改

parent fa893dac
......@@ -34,6 +34,15 @@ export function recommendLesson(query) {
})
}
// 课程详情顶部试听
export function getVideoUrl(query) {
return request({
url: '/bchapter/getVideoUrl',
method: 'get',
params: query
})
}
// 查询课程详情
export function queryOne(businessId,userId) {
return request({
......
......@@ -24,7 +24,7 @@
<el-button
class="studyBtn"
round
@click="topToLessonLearn"
@click="handleToTrialListening"
>试听
</el-button>
</div>
......@@ -336,7 +336,7 @@
<script>
import { getToken } from '@/utils/auth'
import NavList from '@/views/homePage/components/NavList/index'
import { addViewsByLessonId, queryBChapters, queryOne, recommendLesson } from '@/api/bLesson/courseResources'
import { addViewsByLessonId, queryBChapters, queryOne, recommendLesson,getVideoUrl } from '@/api/bLesson/courseResources'
import { cmsLecturerDetail } from '@/api/cmsLecturer'
import { selectDictLabel } from '@/utils/common'
import dictCons from '@/utils/dictCons'
......@@ -517,6 +517,18 @@ export default {
handlePlayerChange(e) {
this.dialogVisible = e
},
/** 课程详情顶部试听*/
handleToTrialListening() {
const params = {
lessonId: this.$route.query.courseId
}
getVideoUrl(params).then(res => {
this.videoId = res.data.videoUrl
this.chapterId = res.data.businessId
this.lessonId = res.data.lessonId
this.dialogVisible = true
})
},
handlePlayBack(data) {
console.log('data', data)
// isAudition === '1' 课程可以试听
......
......@@ -69,7 +69,6 @@
<div class="header-add" @click="handleUpdate(0)">
<png-icon
icon-class="xuexi_chuangjian"
height="16px"
style="margin-right: 5px;color: #3683FC"
/>
创建小组
......@@ -183,6 +182,9 @@ export default {
}
</script>
<style lang="scss" scoped>
.xuexi_chuangjian{
height: 16px;
}
::v-deep
.el-input__inner:focus{
border-color:#3683FC}
......
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