Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cooperation-cme
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-cooperation-cme
提交
b93a1a7e
提交
b93a1a7e
编写于
8月 27, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
被接管时,监听上报
上级
2fa15ef8
变更
2
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
685 行增加
和
4 行删除
+685
-4
pica-video copy 3.vue
src/components/course/pica-video copy 3.vue
+666
-0
pica-video.vue
src/components/course/pica-video.vue
+19
-4
未找到文件。
src/components/course/pica-video copy 3.vue
0 → 100644
浏览文件 @
b93a1a7e
此差异已折叠。
点击以展开。
src/components/course/pica-video.vue
浏览文件 @
b93a1a7e
...
...
@@ -152,6 +152,8 @@ export default {
if
(
this
.
isWechat
)
{
const
player
=
document
.
getElementById
(
this
.
vid
);
player
.
addEventListener
(
"timeupdate"
,
this
.
onTimeUpdate
,
false
);
player
.
addEventListener
(
"play"
,
this
.
onPlay
,
false
);
player
.
addEventListener
(
"pause"
,
this
.
onPause
,
false
);
this
.
player
=
player
;
}
}
,
...
...
@@ -165,6 +167,15 @@ export default {
}
}
,
methods
:
{
// 被接管时,监听上报
onPlay
()
{
this
.
reportOnOff
(
1
);
this
.
isPaused
=
false
;
}
,
onPause
()
{
this
.
reportOnOff
(
2
);
this
.
isPaused
=
true
;
}
,
togglePlay
()
{
if
(
!
this
.
logged
)
{
this
.
$store
.
dispatch
(
'goLogin'
);
...
...
@@ -186,7 +197,7 @@ export default {
}
else
{
this
.
player
.
pause
();
}
this
.
reportOnOff
(
isPaused
?
1
:
2
);
// this.reportOnOff(isPaused ? 1 : 2); // 使用监听发送
this
.
isPaused
=
!
isPaused
;
}
,
// 切换视频
...
...
@@ -220,7 +231,9 @@ export default {
if
(
!
this
.
isPaused
&&
!
this
.
finish
)
{
this
.
reportOnOff
(
2
);
}
this
.
reportLeave
();
if
(
!
this
.
finish
)
{
this
.
reportLeave
();
}
if
(
this
.
playTime
===
0
)
{
this
.
player
.
play
();
}
...
...
@@ -384,6 +397,7 @@ export default {
if
(
!
this
.
provedOver
)
{
this
.
$emit
(
'onVideoEnd'
,
{
type
:
2
}
);
this
.
reportOnOff
(
2
);
this
.
reportLeave
();
}
this
.
finish
=
true
;
this
.
showReplay
=
true
;
...
...
@@ -398,6 +412,7 @@ export default {
this
.
player
.
style
.
display
=
'none'
;
}
this
.
reportOnOff
(
2
);
this
.
reportLeave
();
this
.
$nextTick
(()
=>
{
if
(
this
.
coverType
>
0
&&
this
.
coverType
!==
13
)
{
this
.
isFullScreen
=
false
;
...
...
@@ -419,7 +434,7 @@ export default {
if
(
!
chapterId
||
!
courseId
||
!
lectureId
)
{
return
;
}
this
.
POST
(
'
/
contents/files/resourceRecord'
,
{
this
.
POST
(
'contents/files/resourceRecord'
,
{
fileType
:
1
,
resourceInfo1
:
courseId
,
resourceInfo2
:
chapterId
,
...
...
@@ -439,7 +454,7 @@ export default {
if
(
!
chapterId
||
!
courseId
||
!
lectureId
)
{
return
;
}
this
.
POST
(
'
/
contents/joinCourse/'
,
{
this
.
POST
(
'contents/joinCourse/'
,
{
requestList
:
[{
chapterId
,
courseId
,
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录