Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
53523e60
提交
53523e60
authored
5月 06, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复课程开始学习跳转错误的问题
上级
ff6af890
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
32 行增加
和
13 行删除
+32
-13
courseDetail.vue
client/src/pages/learn/courseDetail.vue
+32
-13
没有找到文件。
client/src/pages/learn/courseDetail.vue
浏览文件 @
53523e60
...
...
@@ -4,16 +4,14 @@
<div
class=
"detail-box"
>
<div
class=
"box-thd"
>
<div
class=
"title"
@
click=
"noWantThisCourse"
>
{{
headerInfo
.
title
}}
<template
v-if=
"tabs[1].chapterList.course[0].chapters[0].vid"
>
<template
v-if=
'headerInfo.isStart && tabs[1].chapterList.currentChapterId'
>
<el-button
class=
"rbtn"
type=
"primary"
size=
"mini"
@
click=
'startLearn'
:data-cid=
'cid'
:data-sid=
'sid'
:data-type=
'tabs[1].chapterList.currentVideoProvider'
:data-vid=
'tabs[1].chapterList.currentChapterId'
>
继续学习
</el-button>
</
template
>
<
template
v-else-if=
'headerInfo.isStart'
>
<el-button
class=
"rbtn"
type=
"primary"
size=
"mini"
@
click=
'startLearn'
:data-cid=
'cid'
:data-sid=
'sid'
:data-type=
'tabs[1].chapterList.course[0].chapters[0].video_provider'
:data-vid=
'tabs[1].chapterList.course[0].chapters[0].vid'
>
开始学习
</el-button>
</
template
>
<
template
v-else
>
<el-button
class=
"rbtn"
type=
"primary"
size=
"mini"
@
click=
'wantThisCourse'
>
选课
</el-button>
</
template
>
<template
v-if=
'headerInfo.isStart && tabs[1].chapterList.currentChapterId'
>
<el-button
class=
"rbtn"
type=
"primary"
size=
"mini"
@
click=
'startLearn'
:data-cid=
'cid'
:data-sid=
'sid'
:data-type=
'tabs[1].chapterList.currentVideoProvider'
:data-vid=
'tabs[1].chapterList.currentChapterId'
>
继续学习
</el-button>
</
template
>
<
template
v-else-if=
'headerInfo.isStart'
>
<el-button
class=
"rbtn"
type=
"primary"
size=
"mini"
@
click=
'startLearn'
:data-cid=
'cid'
:data-sid=
'sid'
:data-type=
'firstVideo.video_provider'
:data-vid=
'firstVideo.vid'
>
开始学习
</el-button>
</
template
>
<
template
v-else
>
<el-button
class=
"rbtn"
type=
"primary"
size=
"mini"
@
click=
'wantThisCourse'
>
选课
</el-button>
</
template
>
</div>
<div
class=
"tags"
>
...
...
@@ -352,7 +350,8 @@ export default {
isOpenNewTabFlag
:
false
,
arrFn
:
[],
cloudClassUrls
:
{},
timeHeart
:
null
timeHeart
:
null
,
firstVideo
:
{}
}
},
mounted
()
{
...
...
@@ -376,6 +375,23 @@ export default {
this
.
tabs
[
0
].
content
=
json
.
tabs0Content
this
.
tabs
[
1
].
chapterList
=
json
.
tabs1ChapterList
json
.
tabs3richTest
&&
(
this
.
tabs
[
3
].
richText
=
json
.
tabs3richTest
)
// 设置开始学习的视频
const
courseList
=
json
.
tabs1ChapterList
.
course
for
(
let
i
=
0
;
i
<
courseList
.
length
;
i
++
)
{
const
children
=
courseList
[
i
].
chapters
||
[]
if
(
this
.
firstVideo
&&
this
.
firstVideo
.
vid
)
{
break
}
for
(
let
k
=
0
;
k
<
children
.
length
;
k
++
)
{
const
item
=
children
[
k
]
if
(
item
.
vid
&&
item
.
video_provider
)
{
this
.
firstVideo
=
item
break
}
}
}
cAction
.
Course
.
getCourseAssess
(
this
.
cid
,
this
.
sid
).
then
(
json1
=>
{
const
_courseArr
=
json
.
tabs1ChapterList
.
course
/* 进行一次 对照,将 视频 vid 赋值 */
...
...
@@ -393,7 +409,6 @@ export default {
}
}
}
this
.
tabs
[
3
].
assess
=
json1
loading
.
close
()
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
})
...
...
@@ -620,7 +635,11 @@ export default {
const
cid
=
_data
.
cid
const
vid
=
_data
.
vid
const
type
=
_data
.
type
this
.
$router
.
push
({
path
:
`/player/
${
sid
}
/
${
cid
}
/chapter-video/
${
vid
}
/
${
type
}
`
})
if
(
vid
&&
type
!==
''
)
{
this
.
$router
.
push
({
path
:
`/player/
${
sid
}
/
${
cid
}
/chapter-video/
${
vid
}
/
${
type
}
`
})
}
else
{
this
.
$message
.
error
(
'当前暂无点播课程'
)
}
},
/**
* 退课 - 隐藏功能,点击 标题15次,进行退课
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论