Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-professional-exam
提交
50c89089
提交
50c89089
编写于
8月 26, 2020
作者:
guofeng.chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改全屏
上级
78dce6ac
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
19 行增加
和
7 行删除
+19
-7
course-covers.vue
src/components/course/course-covers.vue
+3
-0
course-ware.vue
src/components/course/course-ware.vue
+2
-3
pica-video.vue
src/components/course/pica-video.vue
+10
-0
course-detail.vue
src/views/course-detail.vue
+4
-4
未找到文件。
src/components/course/course-covers.vue
浏览文件 @
50c89089
...
...
@@ -49,11 +49,14 @@ export default {
.course-covers-wrapper {
display: flex;
flex-direction: column;
left: 0;
top: 50%;
width: 100%;
height: 210px;
background: rgba(0, 0, 0, 0.8);
justify-content: center;
align-content: center;
transform: translate3d(0, -50%, 0);
.tips {
display: inline-block;
margin-bottom: 15px;
...
...
src/components/course/course-ware.vue
浏览文件 @
50c89089
...
...
@@ -12,7 +12,7 @@
* GlobalWorkerOptions.workerSrc需要一个加载路径
*/
import
pdfJS
from
'pdfjs-dist/es5/build/pdf'
;
pdfJS
.
GlobalWorkerOptions
.
workerSrc
=
'
https:
//cdn.bootcdn.net/ajax/libs/pdf.js/2.4.456/pdf.worker.min.js'
;
pdfJS
.
GlobalWorkerOptions
.
workerSrc
=
'//cdn.bootcdn.net/ajax/libs/pdf.js/2.4.456/pdf.worker.min.js'
;
import
coverImg
from
'@/images/course/lock-big.png'
;
export
default
{
...
...
@@ -37,7 +37,6 @@ export default {
},
methods
:
{
async
drawPDF
()
{
console
.
log
(
'_____url_______'
,
this
.
url
);
if
(
!
this
.
url
)
{
return
;
}
...
...
@@ -86,7 +85,7 @@ export default {
cover
.
style
.
height
=
'100%'
;
cover
.
style
.
background
=
`url(
${
coverImg
}
) no-repeat center center`
;
cover
.
style
.
backgroundSize
=
'50px auto'
;
cover
.
style
.
backgroundColor
=
'rgba(255, 255, 255, .8)'
;
cover
.
style
.
backgroundColor
=
'rgba(255, 255, 255, .8
5
)'
;
cover
.
onclick
=
()
=>
{
if
(
!
this
.
$store
.
getters
.
logged
)
{
this
.
$store
.
dispatch
(
'goLogin'
);
...
...
src/components/course/pica-video.vue
浏览文件 @
50c89089
...
...
@@ -102,6 +102,10 @@ import { formatLeftTimeObj } from '@/utils';
export
default
{
name
:
'pica-video'
,
props
:
{
coverType
:
{
type
:
Number
,
default
:
0
,
}
,
download
:
{
type
:
Function
,
default
:
()
=>
{
}
...
...
@@ -374,6 +378,7 @@ export default {
this
.
finish
=
true
;
this
.
showReplay
=
true
;
this
.
provedOver
=
true
;
this
.
isFullScreen
=
false
;
}
,
// 播放结束
onEnded
()
{
...
...
@@ -383,6 +388,11 @@ export default {
this
.
player
.
style
.
display
=
'none'
;
}
this
.
reportOnOff
(
2
);
this
.
$nextTick
(()
=>
{
if
(
this
.
coverType
>
0
&&
this
.
coverType
!==
13
)
{
this
.
isFullScreen
=
false
;
}
}
)
}
,
onError
()
{
if
(
this
.
url
)
{
...
...
src/views/course-detail.vue
浏览文件 @
50c89089
...
...
@@ -2,7 +2,7 @@
<div
class=
"course-detail"
>
<!-- 视频 -->
<div
class=
"video-box"
>
<pica-video
ref=
"picaVideo"
@
onVideoEnd=
"onVideoEnd"
@
onReplay=
"onReplay"
>
<pica-video
ref=
"picaVideo"
:coverType=
"coverType"
@
onVideoEnd=
"onVideoEnd"
@
onReplay=
"onReplay"
>
<!-- 试看结束 -->
<div
class=
"cover"
v-if=
"logged && coverType === 1"
>
<course-covers
coverTips=
"试看结束
<br
/>
请来云鹊医App学习完整课程" :isSingle="true" rightBtnText="学习完整课程" @btnClick="btnClick" />
...
...
@@ -12,7 +12,7 @@
<course-covers
coverTips=
"本课程为付费课程,请来云鹊医App学习"
:isSingle=
"true"
rightBtnText=
"去云鹊医App"
@
btnClick=
"btnClick"
/>
</div>
<!-- 下一个提示 -->
<div
class=
"next-countdown"
v-if=
"coverType === 3"
>
3秒后播放下一节
</div>
<div
class=
"next-countdown"
v-if=
"coverType ===
1
3"
>
3秒后播放下一节
</div>
<!-- 未学完提示 -->
<div
class=
"cover"
v-if=
"logged && coverType === 4"
>
<course-covers
coverTips=
"您已学习至最后一节
<br
/>
但本课程中仍有未学完的内容" :isSingle="true" rightBtnText="继续学完本课程" @btnClick="btnClick" />
...
...
@@ -165,7 +165,7 @@ export default {
},
methods
:
{
getCourseInfo
()
{
const
{
courseId
=
2
}
=
this
.
$route
.
query
;
const
{
courseId
=
6
}
=
this
.
$route
.
query
;
const
projectId
=
this
.
projectId
||
797
;
this
.
showLoading
=
true
;
this
.
GET
(
`/contents/courses/
${
courseId
}
/pcCourseInfo`
,
{
projectId
}).
then
(
res
=>
{
...
...
@@ -386,7 +386,7 @@ export default {
}
}
else
{
// 3秒后播放下一个
let
next
=
chapters
[
curtI
][
'lectures'
][
curtJ
+
1
]
||
chapters
[
curtI
+
1
][
'lectures'
][
0
];
this
.
coverType
=
3
;
this
.
coverType
=
1
3
;
setTimeout
(()
=>
{
this
.
selectLecture
(
next
);
},
3000
)
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录