Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
806c4935
提交
806c4935
authored
6月 15, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
对接直播中台接口
上级
f99803b3
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
26 行增加
和
41 行删除
+26
-41
CourseAction.js
client/src/action/CourseAction.js
+2
-5
PlayerAction.js
client/src/action/PlayerAction.js
+2
-5
chapter.vue
client/src/modules/viewer/components/aside/chapter.vue
+1
-1
chapterLive.vue
client/src/modules/viewer/components/live/chapterLive.vue
+7
-4
courseDetail.vue
client/src/pages/learn/courseDetail.vue
+4
-8
list.vue
client/src/pages/mobileLive/list.vue
+7
-11
live.vue
client/src/pages/player/live/live.vue
+2
-2
sideChapterList.vue
client/src/pages/player/rightSide/sideChapterList.vue
+1
-5
没有找到文件。
client/src/action/CourseAction.js
浏览文件 @
806c4935
...
@@ -141,9 +141,6 @@ export default class CourseAction extends BaseACTION {
...
@@ -141,9 +141,6 @@ export default class CourseAction extends BaseACTION {
case
0
:
str
=
'直播未开始'
;
break
case
0
:
str
=
'直播未开始'
;
break
case
1
:
str
=
'正在直播'
;
break
case
1
:
str
=
'正在直播'
;
break
case
2
:
str
=
'直播结束'
;
break
case
2
:
str
=
'直播结束'
;
break
case
101
:
str
=
'直播结束,视频剪辑中'
;
break
// 录制开始
case
102
:
str
=
'直播结束,视频剪辑中'
;
break
// 录制结束
case
103
:
str
=
'观看回放'
;
break
default
:
str
=
'直播未开始'
default
:
str
=
'直播未开始'
}
}
// 5分钟内显示“即将开始”,5~1小时内“N分钟后开始”,1~24小时内“N小时后开始”,1天以上“N天后开始”天就显示年月日
// 5分钟内显示“即将开始”,5~1小时内“N分钟后开始”,1~24小时内“N小时后开始”,1天以上“N天后开始”天就显示年月日
...
@@ -159,8 +156,8 @@ export default class CourseAction extends BaseACTION {
...
@@ -159,8 +156,8 @@ export default class CourseAction extends BaseACTION {
str
=
parseInt
(
time
/
(
24
*
60
*
60
))
+
'天后开始'
str
=
parseInt
(
time
/
(
24
*
60
*
60
))
+
'天后开始'
}
}
}
}
if
(
__
.
live
.
live_status
===
103
&&
__
.
live
.
enable_record
!==
undefined
&&
__
.
live
.
enable_record
!==
null
&&
!
__
.
live
.
enable_record
)
{
if
(
__
.
live
.
live_status
===
2
&&
__
.
live
.
enable_record
&&
__
.
live
.
record_url
)
{
str
=
''
str
=
'
观看回放
'
}
}
__
.
live
.
statusStr
=
str
__
.
live
.
statusStr
=
str
}
}
...
...
client/src/action/PlayerAction.js
浏览文件 @
806c4935
...
@@ -93,9 +93,6 @@ export default class PlayerAction extends BaseACTION {
...
@@ -93,9 +93,6 @@ export default class PlayerAction extends BaseACTION {
case
0
:
str
=
'直播未开始'
;
break
case
0
:
str
=
'直播未开始'
;
break
case
1
:
str
=
'正在直播'
;
break
case
1
:
str
=
'正在直播'
;
break
case
2
:
str
=
'直播结束'
;
break
case
2
:
str
=
'直播结束'
;
break
case
101
:
str
=
'直播结束,视频剪辑中'
;
break
// 录制开始
case
102
:
str
=
'直播结束,视频剪辑中'
;
break
// 录制结束
case
103
:
str
=
'观看回放'
;
break
default
:
str
=
'直播未开始'
default
:
str
=
'直播未开始'
}
}
// 5分钟内显示“即将开始”,5~1小时内“N分钟后开始”,1~24小时内“N小时后开始”,1天以上“N天后开始”天就显示年月日
// 5分钟内显示“即将开始”,5~1小时内“N分钟后开始”,1~24小时内“N小时后开始”,1天以上“N天后开始”天就显示年月日
...
@@ -111,8 +108,8 @@ export default class PlayerAction extends BaseACTION {
...
@@ -111,8 +108,8 @@ export default class PlayerAction extends BaseACTION {
str
=
parseInt
(
time
/
(
24
*
60
*
60
))
+
'天后开始'
str
=
parseInt
(
time
/
(
24
*
60
*
60
))
+
'天后开始'
}
}
}
}
if
(
__
.
live
.
live_status
===
103
&&
__
.
live
.
enable_record
!==
undefined
&&
__
.
live
.
enable_record
!==
null
&&
!
__
.
live
.
enable_record
)
{
if
(
__
.
live
.
live_status
===
2
&&
__
.
live
.
enable_record
&&
__
.
live
.
record_url
)
{
str
=
''
str
=
'
观看回放
'
}
}
__
.
live
.
statusStr
=
str
__
.
live
.
statusStr
=
str
}
}
...
...
client/src/modules/viewer/components/aside/chapter.vue
浏览文件 @
806c4935
...
@@ -41,7 +41,7 @@ export default {
...
@@ -41,7 +41,7 @@ export default {
},
},
filters
:
{
filters
:
{
showName
(
name
,
data
)
{
showName
(
name
,
data
)
{
if
(
data
.
type
===
5
)
{
if
(
data
.
type
===
5
&&
data
.
live
)
{
return
`
${
name
}
(
${
data
.
live
.
start_time
}
)`
return
`
${
name
}
(
${
data
.
live
.
start_time
}
)`
}
}
return
name
return
name
...
...
client/src/modules/viewer/components/live/chapterLive.vue
浏览文件 @
806c4935
...
@@ -39,14 +39,17 @@ export default {
...
@@ -39,14 +39,17 @@ export default {
},
},
iframeUrl
()
{
iframeUrl
()
{
const
live
=
this
.
chapter
.
live
const
live
=
this
.
chapter
.
live
const
liveStatus
=
live
.
live_status
if
(
live
.
viewer_name
=
live
.
viewer_name
||
this
.
nickName
live
.
live_status
===
2
&&
if
(
liveStatus
===
103
&&
live
.
enable_record
===
1
)
{
live
.
enable_record
===
1
&&
live
.
record_url
)
{
// enable_record 0:不启用回放 1:开启回放
// enable_record 0:不启用回放 1:开启回放
// 查看回放
// 查看回放
return
`https://view.csslcloud.net/api/view/callback?recordid=
${
live
.
record_id
}
&roomid=
${
live
.
room_id
}
&userid=
${
live
.
user_id
}
&autoLogin=true&viewername=
${
live
.
viewer_name
}
&viewertoken=
${
live
.
viewer_token
}
`
return
live
.
record_url
}
else
{
}
else
{
// 直播
// 直播
live
.
viewer_name
=
live
.
viewer_name
||
this
.
nickName
return
`https://view.csslcloud.net/api/view/index?roomid=
${
live
.
room_id
}
&userid=
${
live
.
user_id
}
&autoLogin=true&viewername=
${
live
.
viewer_name
}
&viewertoken=
${
live
.
viewer_token
}
`
return
`https://view.csslcloud.net/api/view/index?roomid=
${
live
.
room_id
}
&userid=
${
live
.
user_id
}
&autoLogin=true&viewername=
${
live
.
viewer_name
}
&viewertoken=
${
live
.
viewer_token
}
`
}
}
}
}
...
...
client/src/pages/learn/courseDetail.vue
浏览文件 @
806c4935
...
@@ -488,8 +488,8 @@ export default {
...
@@ -488,8 +488,8 @@ export default {
cAction
.
Player
.
getChapterList
(
cid
,
sid
,
_id
).
then
(
json
=>
{
cAction
.
Player
.
getChapterList
(
cid
,
sid
,
_id
).
then
(
json
=>
{
this
.
live
=
(
json
.
curJson
&&
json
.
curJson
.
live
)
||
{}
this
.
live
=
(
json
.
curJson
&&
json
.
curJson
.
live
)
||
{}
if
(
this
.
live
.
id
)
{
if
(
this
.
live
.
id
)
{
if
(
this
.
live
.
record_id
&&
this
.
live
.
live_status
===
103
)
{
if
(
this
.
live
.
live_status
===
2
&&
this
.
live
.
enable_record
&&
this
.
live
.
record_url
)
{
this
.
live
.
url
=
'https://view.csslcloud.net/api/view/callback?recordid='
+
this
.
live
.
record_id
+
'&roomid='
+
this
.
live
.
room_id
+
'&userid='
+
this
.
live
.
user_id
+
'&autoLogin=true&viewername='
+
(
this
.
live
.
viewer_name
||
'匿名'
)
+
'&viewertoken='
+
this
.
live
.
viewer_token
// + '&groupid=xxx'
this
.
live
.
url
=
this
.
live
.
record_url
}
else
{
}
else
{
this
.
live
.
viewer_name
=
window
.
G
.
UserInfo
.
student_info
.
personal_name
||
window
.
G
.
UserInfo
.
nickname
this
.
live
.
viewer_name
=
window
.
G
.
UserInfo
.
student_info
.
personal_name
||
window
.
G
.
UserInfo
.
nickname
this
.
live
.
url
=
'https://view.csslcloud.net/api/view/index?roomid='
+
this
.
live
.
room_id
+
'&userid='
+
this
.
live
.
user_id
+
'&autoLogin=true&viewername='
+
(
this
.
live
.
viewer_name
||
'匿名'
)
+
'&viewertoken='
+
this
.
live
.
viewer_token
// + '&groupid=xxx'
this
.
live
.
url
=
'https://view.csslcloud.net/api/view/index?roomid='
+
this
.
live
.
room_id
+
'&userid='
+
this
.
live
.
user_id
+
'&autoLogin=true&viewername='
+
(
this
.
live
.
viewer_name
||
'匿名'
)
+
'&viewertoken='
+
this
.
live
.
viewer_token
// + '&groupid=xxx'
...
@@ -538,15 +538,11 @@ export default {
...
@@ -538,15 +538,11 @@ export default {
if
(
type
===
5
)
{
if
(
type
===
5
)
{
const
live
=
data
.
live
const
live
=
data
.
live
const
status
=
live
.
live_status
const
status
=
live
.
live_status
if
(
status
!==
0
&&
status
!==
1
&&
status
!==
103
)
{
if
(
status
===
0
||
(
status
===
2
&&
!
live
.
record_url
)
)
{
this
.
$message
.
error
(
live
.
statusStr
)
this
.
$message
.
error
(
live
.
statusStr
)
return
return
}
}
const
enableRecord
=
live
.
enable_record
if
(
status
===
103
&&
enableRecord
!==
undefined
&&
enableRecord
!==
null
&&
!
enableRecord
)
{
this
.
$message
.
info
(
'该直播没有回放'
)
return
}
/* 判别如果为 云课堂记录 id 则直接进入 云课堂 */
/* 判别如果为 云课堂记录 id 则直接进入 云课堂 */
if
(
this
.
cloudClassUrls
[
vid
])
{
if
(
this
.
cloudClassUrls
[
vid
])
{
const
viewerName
=
window
.
G
.
UserInfo
.
student_info
.
personal_name
||
window
.
G
.
UserInfo
.
nickname
const
viewerName
=
window
.
G
.
UserInfo
.
student_info
.
personal_name
||
window
.
G
.
UserInfo
.
nickname
...
...
client/src/pages/mobileLive/list.vue
浏览文件 @
806c4935
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
<
div
class
=
"live-item-content__time"
>
{{
subitem
.
start_time
}}
<
/div
>
<
div
class
=
"live-item-content__time"
>
{{
subitem
.
start_time
}}
<
/div
>
<
div
<
div
class
=
"live-item-content__status"
class
=
"live-item-content__status"
v
-
if
=
"!(subitem.live_status === 103 && !subitem.enable_record)"
>
{{
calcTimeText
(
subitem
.
start_time
,
subitem
.
live_status
)
}}
<
/div
>
>
{{
calcTimeText
(
subitem
.
start_time
,
subitem
.
live_status
)
}}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -133,7 +132,7 @@ export default {
...
@@ -133,7 +132,7 @@ export default {
start_time
:
liveTime
start_time
:
liveTime
}
=
data
}
=
data
let
message
=
this
.
calcTimeText
(
liveTime
,
liveStatus
)
let
message
=
this
.
calcTimeText
(
liveTime
,
liveStatus
)
if
(
liveStatus
===
103
&&
data
.
enable_record
!==
1
)
{
if
(
liveStatus
===
2
&&
!
data
.
enable_record
)
{
message
=
this
.
$t
(
'live.noPlayback'
)
message
=
this
.
$t
(
'live.noPlayback'
)
}
}
if
(
liveType
===
'cloud'
)
{
if
(
liveType
===
'cloud'
)
{
...
@@ -155,7 +154,7 @@ export default {
...
@@ -155,7 +154,7 @@ export default {
if
(
liveStatus
===
1
)
{
if
(
liveStatus
===
1
)
{
// 进行中
// 进行中
this
.
openNewWindow
(
data
.
join_url
)
this
.
openNewWindow
(
data
.
join_url
)
}
else
if
(
liveStatus
===
103
)
{
}
else
if
(
liveStatus
===
2
)
{
// 查看回放
// 查看回放
this
.
openNewWindow
(
data
.
record_url
)
this
.
openNewWindow
(
data
.
record_url
)
}
else
{
}
else
{
...
@@ -173,7 +172,7 @@ export default {
...
@@ -173,7 +172,7 @@ export default {
// 进行中
// 进行中
const
url
=
`http://view.csslcloud.net/api/view/index?roomid=${data.room_id
}
&userid=${data.user_id
}
&autoLogin=true&viewername=${data.username
}
&viewertoken=${data.password
}
`
const
url
=
`http://view.csslcloud.net/api/view/index?roomid=${data.room_id
}
&userid=${data.user_id
}
&autoLogin=true&viewername=${data.username
}
&viewertoken=${data.password
}
`
this
.
openNewWindow
(
url
)
this
.
openNewWindow
(
url
)
}
else
if
(
liveStatus
===
103
)
{
}
else
if
(
liveStatus
===
2
)
{
// 查看回放
// 查看回放
const
replayUrl
=
data
.
record_url
.
replayUrl
const
replayUrl
=
data
.
record_url
.
replayUrl
const
url
=
replayUrl
const
url
=
replayUrl
...
@@ -194,11 +193,11 @@ export default {
...
@@ -194,11 +193,11 @@ export default {
// 进行中
// 进行中
const
url
=
`https://view.csslcloud.net/api/view/index?roomid=${data.room_id
}
&userid=${data.user_id
}
&autoLogin=true&viewername=${data.viewer_name
}
&viewertoken=${data.viewer_token
}
`
const
url
=
`https://view.csslcloud.net/api/view/index?roomid=${data.room_id
}
&userid=${data.user_id
}
&autoLogin=true&viewername=${data.viewer_name
}
&viewertoken=${data.viewer_token
}
`
this
.
openNewWindow
(
url
)
this
.
openNewWindow
(
url
)
}
else
if
(
liveStatus
===
103
&&
data
.
enable_record
===
1
)
{
}
else
if
(
liveStatus
===
2
&&
data
.
enable_record
===
1
)
{
// enable_record 0:不启用回放 1:开启回放
// enable_record 0:不启用回放 1:开启回放
// 查看回放
// 查看回放
const
url
=
`https://view.csslcloud.net/api/view/callback?recordid=${data.record_id
}
&roomid=${data.room_id
}
&userid=${data.user_id
}
&autoLogin=true&viewername=${data.viewer_name
}
&viewertoken=${data.viewer_token
}
`
//
const url = `https://view.csslcloud.net/api/view/callback?recordid=$
{
data
.
record_id
}
&
roomid
=
$
{
data
.
room_id
}
&
userid
=
$
{
data
.
user_id
}
&
autoLogin
=
true
&
viewername
=
$
{
data
.
viewer_name
}
&
viewertoken
=
$
{
data
.
viewer_token
}
`
this
.
openNewWindow
(
url
)
this.openNewWindow(
data.record_
url)
}
else {
}
else {
this.message && this.message.close()
this.message && this.message.close()
this.message = this.$message({ type: 'warning', offset: 0, message
}
)
this.message = this.$message({ type: 'warning', offset: 0, message
}
)
...
@@ -222,10 +221,7 @@ export default {
...
@@ -222,10 +221,7 @@ export default {
const map = {
const map = {
0: this.$t('live.notStarted'),
0: this.$t('live.notStarted'),
1: this.$t('live.liveStreaming'),
1: this.$t('live.liveStreaming'),
2
:
this
.
$t
(
'live.liveEnd'
),
2: this.$t('live.liveEnd')
101
:
this
.
$t
(
'live.liveEndNotVideo'
),
102
:
this
.
$t
(
'live.liveEndNotVideo'
),
103
:
this
.
$t
(
'live.watchReplay'
)
}
}
let result = map[liveStatus] || liveTime
let result = map[liveStatus] || liveTime
...
...
client/src/pages/player/live/live.vue
浏览文件 @
806c4935
...
@@ -51,8 +51,8 @@ export default {
...
@@ -51,8 +51,8 @@ export default {
cAction
.
Player
.
getChapterList
(
this
.
cid
,
this
.
sid
,
this
.
id
).
then
(
json
=>
{
cAction
.
Player
.
getChapterList
(
this
.
cid
,
this
.
sid
,
this
.
id
).
then
(
json
=>
{
this
.
live
=
(
json
.
curJson
&&
json
.
curJson
.
live
)
||
{}
this
.
live
=
(
json
.
curJson
&&
json
.
curJson
.
live
)
||
{}
if
(
this
.
live
.
id
)
{
if
(
this
.
live
.
id
)
{
if
(
this
.
live
.
record_id
&&
this
.
live
.
live_status
===
103
)
{
if
(
this
.
live
.
live_status
===
2
&&
this
.
live
.
enable_record
&&
this
.
live
.
record_url
)
{
this
.
live
.
url
=
'https://view.csslcloud.net/api/view/callback?recordid='
+
this
.
live
.
record_id
+
'&roomid='
+
this
.
live
.
room_id
+
'&userid='
+
this
.
live
.
user_id
+
'&autoLogin=true&viewername='
+
this
.
live
.
viewer_name
+
'&viewertoken='
+
this
.
live
.
viewer_token
// + '&groupid=xxx'
this
.
live
.
url
=
this
.
live
.
record_url
}
else
{
}
else
{
this
.
$emit
(
'changeSideBar'
,
''
)
this
.
$emit
(
'changeSideBar'
,
''
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
client/src/pages/player/rightSide/sideChapterList.vue
浏览文件 @
806c4935
...
@@ -70,12 +70,8 @@ export default {
...
@@ -70,12 +70,8 @@ export default {
this
.
$router
.
push
({
path
:
`/player/
${
sid
}
/
${
cid
}
/exam/
${
_id
}
`
})
this
.
$router
.
push
({
path
:
`/player/
${
sid
}
/
${
cid
}
/exam/
${
_id
}
`
})
}
else
if
(
_course
.
chapters
[
i2
].
type
===
5
)
{
}
else
if
(
_course
.
chapters
[
i2
].
type
===
5
)
{
const
status
=
_course
.
chapters
[
i2
].
live
.
live_status
const
status
=
_course
.
chapters
[
i2
].
live
.
live_status
if
(
status
!==
0
&&
status
!==
1
&&
status
!==
103
)
{
this
.
$message
.
error
(
_course
.
chapters
[
i2
].
live
.
statusStr
)
return
}
const
enableRecord
=
_course
.
chapters
[
i2
].
live
.
enable_record
const
enableRecord
=
_course
.
chapters
[
i2
].
live
.
enable_record
if
(
status
===
103
&&
enableRecord
!==
undefined
&&
enableRecord
!==
null
&&
!
enableRecord
)
{
if
(
status
===
2
&&
enableRecord
)
{
this
.
$message
.
info
(
'该直播没有回放'
)
this
.
$message
.
info
(
'该直播没有回放'
)
return
return
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论