Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
aaf71072
提交
aaf71072
authored
12月 23, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
分享海报
上级
e8a45aae
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
30 行增加
和
5 行删除
+30
-5
.config.dev.js
.config.dev.js
+2
-2
api.js
src/modules/viewer/api.js
+9
-0
chapterPlayer.vue
src/modules/viewer/components/player/chapterPlayer.vue
+19
-3
没有找到文件。
.config.dev.js
浏览文件 @
aaf71072
module
.
exports
=
{
domain
:
'dev.ezijing.com'
,
url
:
'https://
learn-api.ezijing.com/api
'
,
url
:
'https://
paa-learning.ezijing.com
'
,
apiBaseURL
:
'https://learn-api.ezijing.com'
,
others
:
{
url
:
'/app/learn/course'
,
loginUrl
:
'https://login.ezijing.com/auth/login/index'
,
messageBaseURL
:
'
https://test-microservices-message-service-api.ezijing.com
'
messageBaseURL
:
''
},
webpack
:
{
externals
:
{
...
...
src/modules/viewer/api.js
浏览文件 @
aaf71072
...
...
@@ -152,3 +152,12 @@ export function submitCourseExam(semesterId, courseId, examId, data) {
export
function
getCourseExamResult
(
semesterId
,
courseId
,
examId
,
params
)
{
return
httpRequest
.
get
(
`/api/lms-ep/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
params
)
}
/**
* 获取营销数据
* @param {string} courseId 课程ID
* @param {string} chapterId 章节ID
*/
export
function
getShare
(
params
)
{
return
httpRequest
.
get
(
`/api/lms-ep/v3/activities/share/
${
params
.
course_id
}
/
${
params
.
chapter_id
}
`
)
}
src/modules/viewer/components/player/chapterPlayer.vue
浏览文件 @
aaf71072
...
...
@@ -34,6 +34,9 @@
<em
:class=
"skipClass"
@
click=
"toggleSkip"
>
{{
$t
(
'viewerPlayer.skipTitle'
)
}}
</em>
<em
:class=
"autoNextClass"
@
click=
"toggleAutoNext"
>
{{
$t
(
'viewerPlayer.autoNextTitle'
)
}}
</em>
</div>
<el-dialog
:visible
.
sync=
"dialogVisible"
width=
"600px"
top=
"0"
>
<iframe
:src=
"sharePageUrl"
style=
"display:block;width:100%;height:720px;border:0;"
></iframe>
</el-dialog>
</div>
</
template
>
...
...
@@ -80,7 +83,8 @@ export default {
},
player
:
null
,
watchedTime
:
0
,
watchedTimePoint
:
[]
// 视频观看的时间点
watchedTimePoint
:
[],
// 视频观看的时间点
dialogVisible
:
false
// 分享海报弹出
}
},
watch
:
{
...
...
@@ -143,6 +147,9 @@ export default {
return
this
.
flatChapters
[
index
+
1
]
}
return
null
},
sharePageUrl
()
{
return
`https://webapp-pub.ezijing.com/website/prod/share/paa/index.html#/share?courseId=
${
this
.
cid
}
&chapterId=
${
this
.
chapter
.
id
}
`
}
},
methods
:
{
...
...
@@ -184,9 +191,18 @@ export default {
},
// 播放结束
onEnded
()
{
if
(
this
.
isAutoNext
&&
this
.
nextChapter
)
{
this
.
$router
.
push
({
name
:
'viewerCourseChapter'
,
params
:
{
id
:
this
.
nextChapter
.
id
}
})
// if (this.isAutoNext && this.nextChapter) {
// this.$router.push({ name: 'viewerCourseChapter', params: { id: this.nextChapter.id } })
// }
const
params
=
{
course_id
:
this
.
cid
,
chapter_id
:
this
.
chapter
.
id
}
api
.
getShare
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
data
.
need_share
)
{
this
.
dialogVisible
=
true
}
})
},
// 当前播放时间更新
onTimeupdate
(
time
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论