Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
3f3fdba6
提交
3f3fdba6
authored
10月 21, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' into ecollage-dev
上级
dabe1540
bd1b0a95
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
81 行增加
和
96 行删除
+81
-96
CourseAction.js
src/action/CourseAction.js
+1
-2
answerItem.vue
src/modules/discuss/components/answerItem.vue
+24
-19
chapter.vue
src/modules/viewer/components/aside/chapter.vue
+7
-1
chapterLive.vue
src/modules/viewer/components/live/chapterLive.vue
+1
-1
fileList.vue
src/modules/viewer/components/read/fileList.vue
+4
-2
chapterTest.vue
src/modules/viewer/components/work/chapterTest.vue
+10
-23
course.vue
src/pages/learn/course.vue
+3
-2
courseDetail.vue
src/pages/learn/courseDetail.vue
+9
-3
index.vue
src/pages/mobile/index.vue
+0
-0
list.vue
src/pages/mobile/list.vue
+16
-36
studentHelp.vue
src/pages/mobile/studentHelp.vue
+0
-0
teacherHelp.vue
src/pages/mobile/teacherHelp.vue
+0
-0
routes.js
src/router/routes.js
+6
-7
没有找到文件。
src/action/CourseAction.js
浏览文件 @
3f3fdba6
...
...
@@ -143,8 +143,7 @@ export default class CourseAction extends BaseACTION {
case
2
:
str
=
'正在直播'
;
break
case
3
:
str
=
'直播结束'
;
break
case
4
:
str
=
'即将开始'
;
break
case
5
:
str
=
'直播未开始'
;
break
case
11
:
str
=
'直播结束'
;
break
case
5
:
str
=
'直播结束'
;
break
default
:
str
=
'直播未开始'
}
// 5分钟内显示“即将开始”,5~1小时内“N分钟后开始”,1~24小时内“N小时后开始”,1天以上“N天后开始”天就显示年月日
...
...
src/modules/discuss/components/answerItem.vue
浏览文件 @
3f3fdba6
...
...
@@ -4,24 +4,24 @@
<div
class=
"user-1"
>
<img
class=
"img-1"
:src=
"avatar"
/>
<div
class=
"right-1"
>
<div
class=
"name-1"
>
{{
data
.
replier
.
nickname
}}
</div>
<div
class=
"time-1"
>
{{
data
.
created_time
}}
</div>
<div
class=
"name-1"
>
{{
data
.
replier
.
nickname
}}
</div>
<div
class=
"time-1"
>
{{
data
.
created_time
}}
</div>
</div>
</div>
<div
class=
"text"
v-html=
"data.contents"
></div>
<div
class=
"user"
>
<template
v-if=
"data.mine"
>
<div
class=
"right-txt"
@
click=
"deleteAnswer(data.id)"
>
{{
$t
(
'pages.learn.discussDetail.delete'
)
}}
</div>
<div
class=
"right-txt"
@
click=
"deleteAnswer(data.id)"
>
{{
$t
(
'pages.learn.discussDetail.delete'
)
}}
</div>
</
template
>
<div
class=
"right-txt"
@
click=
"$emit('reply', {answer_id: data.id})"
>
{{ $t('pages.learn.discussDetail.reply') }}
</div>
<div
class=
"right-txt"
@
click=
"commentVisible = !commentVisible"
>
{{ $t('pages.learn.discussDetail.discuss') }}({{data.comments.length}})
</div>
<div
class=
"right-txt"
@
click=
"$emit('btnlike', {tagId: data.tag ? data.tag.id : null, ansId: data.id})"
>
点赞({{data.tag_count}})
</div>
<div
class=
"right-txt"
@
click=
"$emit('reply', { answer_id: data.id })"
>
{{ $t('pages.learn.discussDetail.reply') }}
</div>
<div
class=
"right-txt"
@
click=
"commentVisible = !commentVisible"
>
{{ $t('pages.learn.discussDetail.discuss') }}({{ data.comments.length }})
</div>
<div
class=
"right-txt"
@
click=
"$emit('btnlike', { tagId: data.tag ? data.tag.id : null, ansId: data.id })"
>
点赞({{ data.tag_count }})
</div>
</div>
<
template
v-if=
"commentVisible"
>
<!-- 评论列表 -->
...
...
@@ -36,29 +36,34 @@
<
script
>
import
*
as
api
from
'../api/index.js'
import
replyItem
from
'./replyItem.vue'
import
defaultAvatar
from
'../assets/images/person-default.jpg'
export
default
{
components
:
{
replyItem
},
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
console
.
log
(
this
.
data
)
return
{
commentVisible
:
false
}
},
computed
:
{
avatar
()
{
return
this
.
data
.
replier
.
avatar
||
'../assets/images/person-default.jpg'
return
this
.
data
.
replier
.
avatar
||
defaultAvatar
}
},
methods
:
{
deleteAnswer
(
id
)
{
deleteAnswer
(
id
)
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
api
.
deleteAnswer
(
id
).
then
(
json
=>
{
this
.
$emit
(
'updateList'
)
this
.
$message
({
type
:
'success'
,
message
:
this
.
$t
(
'pages.learn.discussDetail.deleteSuccess'
)
})
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
api
.
deleteAnswer
(
id
)
.
then
(
json
=>
{
this
.
$emit
(
'updateList'
)
this
.
$message
({
type
:
'success'
,
message
:
this
.
$t
(
'pages.learn.discussDetail.deleteSuccess'
)
})
})
.
finally
(()
=>
{
loading
.
close
()
})
}
}
}
...
...
src/modules/viewer/components/aside/chapter.vue
浏览文件 @
3f3fdba6
...
...
@@ -62,7 +62,13 @@ export default {
}
// zoom直播
if
(
data
.
type
===
8
)
{
window
.
open
(
data
.
live
.
record_url
||
data
.
live
.
join_url
)
const
live
=
data
.
live
const
hasRecordUrl
=
live
.
enable_record
&&
live
.
record_url
if
([
3
,
5
].
includes
(
live
.
live_status
)
&&
!
hasRecordUrl
)
{
this
.
$message
.
error
(
'直播结束'
)
return
}
window
.
open
(
live
.
record_url
||
live
.
join_url
)
return
}
// 课程大作业
...
...
src/modules/viewer/components/live/chapterLive.vue
浏览文件 @
3f3fdba6
...
...
@@ -48,7 +48,7 @@ export default {
},
// 是否直播结束
isLiveEnd
()
{
return
this
.
live
.
live_status
===
2
return
[
3
,
5
].
includes
(
this
.
live
.
live_status
)
},
// 是否有回放
hasRecord
()
{
...
...
src/modules/viewer/components/read/fileList.vue
浏览文件 @
3f3fdba6
...
...
@@ -4,7 +4,7 @@
<li
class=
"file-list-item"
v-for=
"file in files"
:key=
"file.id"
>
<a
:href=
"file.file_url"
target=
"_blank"
>
<i
class=
"el-icon-document"
></i>
<div
v-html=
"file.file_name"
></div>
<div
class=
"file-list-item__inner"
v-html=
"file.file_name"
></div>
</a>
<!--
<span
v-if=
"file.file_size"
>
{{
file
.
file_size
}}
</span>
-->
<a
:href=
"file.file_url"
:download=
"file.file_name"
target=
"_blank"
>
...
...
@@ -50,7 +50,6 @@ export default {
align-items
:
center
;
text-decoration
:
none
;
color
:
#333
;
white-space
:
nowrap
;
&
:hover
{
color
:
#b49441
;
}
...
...
@@ -67,4 +66,7 @@ export default {
text-align
:
center
;
border-radius
:
40px
;
}
.file-list-item__inner
{
margin
:
0
10px
!
important
;
}
</
style
>
src/modules/viewer/components/work/chapterTest.vue
浏览文件 @
3f3fdba6
<
template
>
<container
:title=
"chapter.name"
v-loading=
"loading"
>
<template
v-slot:header-aside
v-if=
"isSubmited"
>
正确率:
{{
detail
.
score
}}
%
</
template
>
<template
v-slot:header-aside
v-if=
"isSubmited"
>
正确率:
{{
detail
.
score
}}
%
</
template
>
<div
class=
"exam"
>
<div
class=
"exam-form"
>
<el-form
:disabled=
"isSubmited"
>
<exam-item
v-for=
"(item, index) in
unorderedQ
uestions"
v-for=
"(item, index) in
q
uestions"
:index=
"index"
:type=
"item.question_type"
:data=
"item"
...
...
@@ -15,7 +15,7 @@
></exam-item>
<div
class=
"exam-buttons"
>
<el-tooltip
effect=
"dark"
content=
"提交之后就不能修改了哦"
placement=
"right"
>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"onSubmit"
>
{{
submitText
}}
</el-button>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"onSubmit"
>
{{
submitText
}}
</el-button>
</el-tooltip>
</div>
</el-form>
...
...
@@ -60,9 +60,7 @@ export default {
chapter
:
{
immediate
:
true
,
handler
(
data
)
{
this
.
questions
=
data
.
homework
?
this
.
genQuenstions
(
data
.
homework
.
questions
)
:
[]
this
.
questions
=
data
.
homework
?
this
.
genQuenstions
(
data
.
homework
.
questions
)
:
[]
}
}
},
...
...
@@ -110,16 +108,13 @@ export default {
const
parseAnswers
=
JSON
.
parse
(
this
.
detail
.
work_contents
)
// 设置答案
this
.
questions
=
this
.
questions
.
map
(
item
=>
{
const
found
=
parseAnswers
.
find
(
answer
=>
answer
.
question_id
===
item
.
id
)
const
found
=
parseAnswers
.
find
(
answer
=>
answer
.
question_id
===
item
.
id
)
if
(
found
)
{
const
selectedIds
=
found
.
options
.
reduce
((
result
,
item
)
=>
{
item
.
selected
&&
result
.
push
(
item
.
id
)
return
result
},
[])
item
.
user_answer
=
item
.
question_type
===
2
?
selectedIds
:
selectedIds
[
0
]
item
.
user_answer
=
item
.
question_type
===
2
?
selectedIds
:
selectedIds
[
0
]
}
return
item
})
...
...
@@ -152,9 +147,7 @@ export default {
temp
=
{
formModel
:
{
id
:
item
.
id
,
user_answer
:
item
.
user_answer
?
Base64
.
decode
(
item
.
user_answer
)
:
''
,
user_answer
:
item
.
user_answer
?
Base64
.
decode
(
item
.
user_answer
)
:
''
,
attachments
:
item
.
attachments
||
''
}
}
...
...
@@ -164,9 +157,7 @@ export default {
item
,
{
content
:
item
.
question_content
,
options
:
item
.
question_options
?
JSON
.
parse
(
item
.
question_options
)
:
[]
options
:
item
.
question_options
?
JSON
.
parse
(
item
.
question_options
)
:
[]
},
temp
)
...
...
@@ -192,9 +183,7 @@ export default {
return
}
// 计算答题时间
const
duration
=
Math
.
floor
(
(
new
Date
().
getTime
()
-
this
.
startTime
)
/
1000
)
const
duration
=
Math
.
floor
((
new
Date
().
getTime
()
-
this
.
startTime
)
/
1000
)
// 答案数据
const
data
=
this
.
handleSubmitData
()
// 计算分数
...
...
@@ -224,9 +213,7 @@ export default {
// 选择的项
const
answers
=
item
.
formModel
.
user_answer
// 是否选中该项
const
selected
=
Array
.
isArray
(
answers
)
?
answers
.
includes
(
option
.
id
)
:
option
.
id
===
answers
const
selected
=
Array
.
isArray
(
answers
)
?
answers
.
includes
(
option
.
id
)
:
option
.
id
===
answers
// 是否选择正确
if
(
option
.
checked
!==
selected
&&
isCorrect
)
{
isCorrect
=
false
...
...
src/pages/learn/course.vue
浏览文件 @
3f3fdba6
...
...
@@ -190,8 +190,9 @@ export default {
},
/* 直接进直播 */
goLive
()
{
if
(
this
.
newLiveMsg
.
live
.
type
===
8
)
{
window
.
open
(
this
.
newLiveMsg
.
live
.
record_url
||
this
.
newLiveMsg
.
live
.
join_url
)
const
live
=
this
.
newLiveMsg
.
live
if
(
live
.
type
===
8
)
{
window
.
open
(
live
.
record_url
||
live
.
join_url
)
}
else
{
this
.
$router
.
push
({
name
:
'viewerCourseChapter'
,
params
:
{
sid
:
this
.
newLiveMsg
.
semester_id
,
cid
:
this
.
newLiveMsg
.
course_id
,
id
:
this
.
newLiveMsg
.
chapter_id
}
})
}
...
...
src/pages/learn/courseDetail.vue
浏览文件 @
3f3fdba6
...
...
@@ -463,7 +463,7 @@ export default {
cAction
.
Player
.
getChapterList
(
cid
,
sid
,
_id
).
then
(
json
=>
{
this
.
live
=
(
json
.
curJson
&&
json
.
curJson
.
live
)
||
{}
if
(
this
.
live
.
id
)
{
if
(
this
.
live
.
live_status
===
2
&&
this
.
live
.
enable_record
&&
this
.
live
.
record_url
)
{
if
(
this
.
live
.
live_status
===
3
&&
this
.
live
.
enable_record
&&
this
.
live
.
record_url
)
{
this
.
live
.
url
=
this
.
live
.
record_url
}
else
{
this
.
live
.
viewer_name
=
window
.
G
.
UserInfo
.
student_info
.
personal_name
||
window
.
G
.
UserInfo
.
nickname
...
...
@@ -512,8 +512,8 @@ export default {
// cc直播
if
(
type
===
5
)
{
const
live
=
data
.
live
const
status
=
live
.
live_status
if
(
status
===
2
&&
!
live
.
enable_record
)
{
const
hasRecordUrl
=
live
.
enable_record
&&
live
.
record_url
if
(
[
3
,
5
].
includes
(
live
.
live_status
)
&&
!
hasRecordUrl
)
{
this
.
$message
.
error
(
live
.
statusStr
)
return
}
...
...
@@ -533,6 +533,12 @@ export default {
}
// zoom直播
if
(
type
===
8
)
{
const
live
=
data
.
live
const
hasRecordUrl
=
live
.
enable_record
&&
live
.
record_url
if
([
3
,
5
].
includes
(
live
.
live_status
)
&&
!
hasRecordUrl
)
{
this
.
$message
.
error
(
live
.
statusStr
)
return
}
window
.
open
(
data
.
live
.
record_url
||
data
.
live
.
join_url
)
return
}
...
...
src/pages/mobile
Live
/index.vue
→
src/pages/mobile/index.vue
浏览文件 @
3f3fdba6
File moved
src/pages/mobile
Live
/list.vue
→
src/pages/mobile/list.vue
浏览文件 @
3f3fdba6
...
...
@@ -121,41 +121,31 @@ export default {
}
,
onClick
(
data
)
{
data
.
live_status
=
parseInt
(
data
.
live_status
)
const
{
live_status
:
liveStatus
,
type
:
liveType
=
5
,
start_time
:
liveTime
}
=
data
let
message
=
this
.
calcTimeText
(
liveTime
,
liveStatus
)
if
(
liveStatus
===
2
&&
!
data
.
enable_record
)
{
message
=
this
.
$t
(
'live.noPlayback'
)
const
{
live_status
:
liveStatus
,
type
:
liveType
}
=
data
const
hasRecordUrl
=
data
.
enable_record
&&
data
.
record_url
if
([
3
,
5
].
includes
(
liveStatus
)
&&
!
hasRecordUrl
)
{
this
.
message
&&
this
.
message
.
close
()
this
.
message
=
this
.
$message
({
type
:
'warning'
,
offset
:
0
,
message
}
)
return
}
if
(
liveType
===
'cloud'
)
{
// 打开云课堂
this
.
openCloudClass
(
data
,
message
)
this
.
message
=
this
.
$message
({
type
:
'warning'
,
offset
:
0
,
message
:
this
.
$t
(
'live.liveEnd'
)
}
)
return
}
if
(
liveType
===
5
)
{
// 打开云直播
this
.
openCloudLive
(
data
,
message
)
this
.
openCloudLive
(
data
)
return
}
if
(
liveType
===
'
meeting
'
)
{
// 打开
腾讯会议
this
.
open
Meeting
(
data
,
message
)
if
(
liveType
===
'
cloud
'
)
{
// 打开
云课堂
this
.
open
CloudClass
(
data
)
return
}
this
.
openNewWindow
(
data
.
record_url
||
data
.
join_url
)
}
,
// 打开云课堂
openCloudClass
(
data
,
message
)
{
openCloudClass
(
data
)
{
// https://doc.bokecc.com/class/developer/api/login.html
const
liveStatus
=
data
.
live_status
data
.
user_name
=
data
.
user_name
||
window
.
G
.
UserInfo
.
student_info
.
personal_name
if
(
liveStatus
===
1
)
{
// 进行中
const
url
=
`http://view.csslcloud.net/api/view/index?roomid=${data.room_id
}
&userid=${data.account_id
}
&autoLogin=true&viewername=${data.username
}
&viewertoken=${data.password
}
`
this
.
openNewWindow
(
url
)
}
else
if
(
liveStatus
===
2
)
{
if
(
liveStatus
===
3
)
{
// 查看回放
const
replayUrl
=
data
.
record_url
.
replayUrl
const
url
=
replayUrl
...
...
@@ -163,17 +153,17 @@ export default {
:
''
this
.
openNewWindow
(
url
)
}
else
{
this
.
message
&&
this
.
message
.
close
()
this
.
message
=
this
.
$message
({
type
:
'warning'
,
offset
:
0
,
message
}
)
// 进行中
const
url
=
`http://view.csslcloud.net/api/view/index?roomid=${data.room_id
}
&userid=${data.account_id
}
&autoLogin=true&viewername=${data.username
}
&viewertoken=${data.password
}
`
this
.
openNewWindow
(
url
)
}
}
,
// 打开云直播
openCloudLive
(
data
,
message
)
{
openCloudLive
(
data
)
{
// https://doc.bokecc.com/live/Appendix_1.html
const
liveStatus
=
data
.
live_status
data
.
user_name
=
data
.
user_name
||
this
.
nickName
if
(
liveStatus
===
2
&&
data
.
enable_record
===
1
)
{
// enable_record 0:不启用回放 1:开启回放
if
(
liveStatus
===
3
)
{
// 查看回放
// const url = `https://view.csslcloud.net/api/view/callback?recordid=$
{
data
.
record_id
}
&
roomid
=
$
{
data
.
room_id
}
&
userid
=
$
{
data
.
account_id
}
&
autoLogin
=
true
&
viewername
=
$
{
data
.
user_name
}
&
viewertoken
=
$
{
data
.
play_pass
}
`
this.openNewWindow(data.record_url)
...
...
@@ -183,15 +173,6 @@ export default {
this.openNewWindow(url)
}
}
,
// 打开腾讯会议
openMeeting(data, message) {
if (data.join_url) {
this.openNewWindow(data.join_url)
}
else {
this.message && this.message.close()
this.message = this.$message({ type: 'warning', offset: 0, message
}
)
}
}
,
// 新窗口打开
openNewWindow(url) {
url && window.open(url, '_blank')
...
...
@@ -203,8 +184,7 @@ export default {
2: this.$t('live.liveStreaming'),
3: this.$t('live.liveEnd'),
4: this.$t('live.start'),
5: this.$t('live.notStarted'),
11: this.$t('live.liveEnd')
5: this.$t('live.liveEnd')
}
let result = map[liveStatus] || liveTime
...
...
src/pages/mobile
Live
/studentHelp.vue
→
src/pages/mobile/studentHelp.vue
浏览文件 @
3f3fdba6
File moved
src/pages/mobile
Live
/teacherHelp.vue
→
src/pages/mobile/teacherHelp.vue
浏览文件 @
3f3fdba6
File moved
src/router/routes.js
浏览文件 @
3f3fdba6
import
viewerRoutes
from
'@/modules/viewer/routes.js'
export
default
[
{
path
:
'*'
,
redirect
:
'/'
},
{
path
:
'/'
,
redirect
:
'/app/learn/course'
},
{
path
:
'/login/index'
,
...
...
@@ -263,11 +264,11 @@ export default [
}
]
},
/* mobile
Live
移动端 */
/* mobile 移动端 */
{
path
:
'/mobile'
,
redirect
:
'/mobile/0/0/error/404'
,
component
:
()
=>
import
(
'@/pages/mobile
Live
/index.vue'
),
component
:
()
=>
import
(
'@/pages/mobile/index.vue'
),
props
:
true
,
children
:
[
{
...
...
@@ -277,18 +278,18 @@ export default [
{
path
:
'list'
,
name
:
'mobileIndex'
,
component
:
()
=>
import
(
'@/pages/mobile
Live
/list.vue'
),
component
:
()
=>
import
(
'@/pages/mobile/list.vue'
),
props
:
true
},
{
path
:
'help/student'
,
name
:
'studentHelp'
,
component
:
()
=>
import
(
'@/pages/mobile
Live
/studentHelp.vue'
)
component
:
()
=>
import
(
'@/pages/mobile/studentHelp.vue'
)
},
{
path
:
'help/teacher'
,
name
:
'teacherHelp'
,
component
:
()
=>
import
(
'@/pages/mobile
Live
/teacherHelp.vue'
)
component
:
()
=>
import
(
'@/pages/mobile/teacherHelp.vue'
)
}
]
},
...
...
@@ -308,8 +309,6 @@ export default [
// },
// /* survey-phone 内未找到页面时 - 指向 */
// { path: '/survey-phone/*', redirect: '/learn-error/learn-error' },
/* 如果所有页面都没找到 - 指向 */
{
path
:
'*'
,
component
:
()
=>
import
(
'@/components/errorPages/404.vue'
)
},
// viewer module routes
...
viewerRoutes
]
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论