Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
8a02c791
提交
8a02c791
authored
11月 17, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改国际化内容
上级
af1cdf8b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
63 行增加
和
36 行删除
+63
-36
CourseAction.js
src/action/CourseAction.js
+15
-15
en.json
src/assets/languages/en.json
+6
-1
zh-CN.json
src/assets/languages/zh-CN.json
+7
-2
videoPlayer.vue
src/modules/viewer/components/player/videoPlayer.vue
+8
-1
index.vue
src/modules/viewer/index.vue
+11
-1
courseDetail.vue
src/pages/learn/courseDetail.vue
+16
-16
没有找到文件。
src/action/CourseAction.js
浏览文件 @
8a02c791
...
...
@@ -139,28 +139,28 @@ export default class CourseAction extends BaseACTION {
__
.
live
.
live_status
=
parseInt
(
__
.
live
.
live_status
)
let
str
=
''
switch
(
__
.
live
.
live_status
)
{
case
1
:
str
=
'直播未开始'
;
break
case
2
:
str
=
'正在直播'
;
break
case
3
:
str
=
'直播结束'
;
break
case
4
:
str
=
'即将开始'
;
break
case
5
:
str
=
'直播结束'
;
break
default
:
str
=
'直播未开始'
case
1
:
str
=
_vIn
.
$t
(
'live.notStarted'
)
;
break
case
2
:
str
=
_vIn
.
$t
(
'live.liveStreaming'
)
;
break
case
3
:
str
=
_vIn
.
$t
(
'live.liveEnd'
)
;
break
case
4
:
str
=
_vIn
.
$t
(
'live.start'
)
;
break
case
5
:
str
=
_vIn
.
$t
(
'live.liveEnd'
)
;
break
default
:
str
=
_vIn
.
$t
(
'live.notStarted'
)
}
// 5分钟内显示“即将开始”,5~1小时内“N分钟后开始”,1~24小时内“N小时后开始”,1天以上“N天后开始”天就显示年月日
if
(
__
.
live
.
live_status
===
1
&&
__
.
live
.
start_time
)
{
const
time
=
(
new
Date
(
__
.
live
.
start_time
).
getTime
()
-
new
Date
().
getTime
())
/
1000
if
(
time
<=
5
*
60
)
{
str
=
'即将开始'
str
=
_vIn
.
$t
(
'live.start'
)
}
else
if
(
time
<=
1
*
60
*
60
)
{
str
=
parseInt
(
time
/
60
)
+
'分钟后开始'
str
=
_vIn
.
$t
(
'live.startInMinutes'
,
{
minutes
:
parseInt
(
time
/
60
)
})
}
else
if
(
time
<=
24
*
60
*
60
)
{
str
=
parseInt
(
time
/
(
60
*
60
))
+
'小时'
+
parseInt
(
time
/
60
%
60
)
+
'分钟后开始'
str
=
_vIn
.
$t
(
'live.startInHours'
,
{
h
:
parseInt
(
time
/
(
60
*
60
)),
min
:
parseInt
(
time
/
60
%
60
)
})
}
else
{
str
=
parseInt
(
time
/
(
24
*
60
*
60
))
+
'天后开始'
str
=
_vIn
.
$t
(
'live.startInDay'
,
{
day
:
parseInt
(
time
/
(
24
*
60
*
60
))
})
}
}
if
(
__
.
live
.
live_status
===
3
&&
__
.
live
.
enable_record
&&
__
.
live
.
record_url
)
{
str
=
'观看回放'
str
=
_vIn
.
$t
(
'live.watchReplay'
)
}
__
.
live
.
statusStr
=
str
}
...
...
@@ -184,7 +184,7 @@ export default class CourseAction extends BaseACTION {
})
}
json
.
tabs1ChapterList
.
course
.
push
({
title
:
'课程大作业'
,
title
:
_vIn
.
$t
(
'action.courseAction.courseWork'
)
,
isUp
:
true
,
chapters
:
[],
id
:
'course_work'
,
...
...
@@ -193,7 +193,7 @@ export default class CourseAction extends BaseACTION {
type
:
99
})
json
.
tabs1ChapterList
.
course
.
push
({
title
:
'课程资料'
,
title
:
_vIn
.
$t
(
'action.courseAction.courseData'
)
,
isUp
:
true
,
chapters
:
[],
id
:
'course_info'
,
...
...
@@ -202,7 +202,7 @@ export default class CourseAction extends BaseACTION {
type
:
100
})
json
.
tabs1ChapterList
.
course
.
push
({
title
:
'教学评估'
,
title
:
_vIn
.
$t
(
'action.courseAction.teachingEvaluation'
)
,
isUp
:
true
,
chapters
:
[],
id
:
'teach_evaluation'
,
...
...
@@ -227,7 +227,7 @@ export default class CourseAction extends BaseACTION {
})
}
json
.
tabs1ChapterList
.
course
.
push
({
title
:
'课程考试'
,
title
:
_vIn
.
$t
(
'action.courseAction.courseExam'
)
,
isUp
:
true
,
chapters
:
courseExamChildren
,
id
:
'course_exam'
,
...
...
src/assets/languages/en.json
浏览文件 @
8a02c791
...
...
@@ -13,7 +13,12 @@
"credit"
:
"Credits"
,
"to"
:
" to "
,
"totalScore"
:
"Overall result:"
,
"none"
:
"No"
"none"
:
"No"
,
"workData"
:
"Assignment & material"
,
"courseWork"
:
"Final assignment"
,
"courseData"
:
"Course materials"
,
"courseExam"
:
"Course exam"
,
"teachingEvaluation"
:
"Teaching evaluation"
}
},
"components"
:
{
...
...
src/assets/languages/zh-CN.json
浏览文件 @
8a02c791
...
...
@@ -13,8 +13,13 @@
"credit"
:
"学分"
,
"to"
:
" 至 "
,
"totalScore"
:
"总成绩:"
,
"none"
:
"暂无"
}
"none"
:
"暂无"
,
"workData"
:
"大作业及资料"
,
"courseWork"
:
"课程大作业"
,
"courseData"
:
"课程资料"
,
"courseExam"
:
"课程考试"
,
"teachingEvaluation"
:
"教学评估"
}
},
"components"
:
{
"learnSysLayout"
:
{
...
...
src/modules/viewer/components/player/videoPlayer.vue
浏览文件 @
8a02c791
...
...
@@ -8,7 +8,8 @@ export default {
props
:
{
isSkip
:
Boolean
,
video
:
Object
,
autoplay
:
{
type
:
Boolean
,
default
:
false
}
autoplay
:
{
type
:
Boolean
,
default
:
false
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
player
:
null
}
...
...
@@ -41,6 +42,12 @@ export default {
language
:
this
.
$i18n
.
locale
===
'zh-CN'
?
'zh-cn'
:
'en-us'
},
function
(
player
)
{
// 禁止调整进度,隐藏声音和倍数
if
(
this
.
disabled
)
{
$
(
'.prism-volume, .prism-setting-speed'
).
hide
()
$
(
'.prism-progress'
).
css
(
'pointer-events'
,
'none'
)
}
player
.
on
(
'ready'
,
function
()
{
// 跳过片头
_this
.
isSkip
&&
player
.
seek
(
6
)
...
...
src/modules/viewer/index.vue
浏览文件 @
8a02c791
...
...
@@ -68,7 +68,8 @@ export default {
ppts
:
[],
pptIndex
:
0
,
isSeek
:
false
,
menuVisible
:
true
menuVisible
:
true
,
timer
:
null
}
},
watch
:
{
...
...
@@ -162,6 +163,11 @@ export default {
this
.
detail
=
response
})
},
// 定时自动获取课程详情
autoGetChapterList
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
this
.
timer
=
setInterval
(
this
.
getCourse
,
10000
)
},
// PPT列表更新
handlePPTupdate
(
list
)
{
this
.
ppts
=
list
...
...
@@ -174,6 +180,10 @@ export default {
},
beforeMount
()
{
this
.
getCourse
()
// this.autoGetChapterList()
},
beforeDestroy
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
}
}
</
script
>
...
...
src/pages/learn/courseDetail.vue
浏览文件 @
8a02c791
...
...
@@ -494,22 +494,22 @@ export default {
cAction
.
Course
.
getCourseAssess
(
this
.
cid
,
this
.
sid
)
.
then
(
json1
=>
{
const
_courseArr
=
json
.
tabs1ChapterList
.
course
/* 进行一次 对照,将 视频 vid 赋值 */
/* BUG: 如果有某一章 都没有视频时,对照失败,从没有的那一章开始,后面全部没有vid */
for
(
let
i
=
0
;
i
<
json1
.
video
.
length
;
i
++
)
{
const
_tmp
=
json1
.
video
[
i
].
arr
const
_tmp1
=
_courseArr
[
i
].
chapters
for
(
let
j
=
0
;
j
<
_tmp
.
length
;
j
++
)
{
for
(
let
k
=
j
;
k
<
_tmp1
.
length
;
k
++
)
{
if
(
_tmp
[
j
].
id
===
_tmp1
[
k
].
id
)
{
_tmp
[
j
].
vid
=
_tmp1
[
k
].
vid
_tmp
[
j
].
duration
=
_tmp1
[
k
].
duration
break
}
}
}
}
//
const _courseArr = json.tabs1ChapterList.course
/
/ /
* 进行一次 对照,将 视频 vid 赋值 */
/
/ /
* BUG: 如果有某一章 都没有视频时,对照失败,从没有的那一章开始,后面全部没有vid */
//
for (let i = 0; i
<
json1
.
video
.
length
;
i
++
)
{
//
const _tmp = json1.video[i].arr
//
const _tmp1 = _courseArr[i].chapters
//
for (let j = 0; j
<
_tmp
.
length
;
j
++
)
{
//
for (let k = j; k
<
_tmp1
.
length
;
k
++
)
{
//
if (_tmp[j].id === _tmp1[k].id) {
//
_tmp[j].vid = _tmp1[k].vid
//
_tmp[j].duration = _tmp1[k].duration
//
break
//
}
//
}
//
}
//
}
this
.
tabs
[
3
].
assess
=
json1
loading
.
close
()
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论