Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
09d70db6
提交
09d70db6
authored
4月 09, 2020
作者:
zyx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
3edc05ed
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
139 行增加
和
113 行删除
+139
-113
.config.dev.js
client/.config.dev.js
+6
-1
.config.pro.js
client/.config.pro.js
+6
-1
.config.test.js
client/.config.test.js
+6
-1
index.html
client/src/index.html
+11
-0
chapterExam.vue
client/src/pages/player/chapterExam/chapterExam.vue
+1
-1
videoH5.vue
client/src/pages/player/chapterVideo/videoH5.vue
+5
-5
chapterWork.vue
client/src/pages/player/chapterWork/chapterWork.vue
+14
-14
courseWork.vue
client/src/pages/player/courseWork/courseWork.vue
+13
-13
exam.vue
client/src/pages/player/exam/exam.vue
+19
-19
index.vue
client/src/pages/player/index.vue
+1
-1
routes.js
client/src/router/routes.js
+57
-57
没有找到文件。
client/.config.dev.js
浏览文件 @
09d70db6
...
@@ -4,7 +4,12 @@ module.exports = {
...
@@ -4,7 +4,12 @@ module.exports = {
// apiBaseURL: '//demo-login.ezijing.com/'
// apiBaseURL: '//demo-login.ezijing.com/'
webpack
:
{
webpack
:
{
externals
:
{
externals
:
{
'CKEDITOR'
:
'window.CKEDITOR'
'CKEDITOR'
:
'window.CKEDITOR'
,
'VideoJs'
:
'window.swfobject'
,
'Base64'
:
'window.Base64'
,
// 'sentNotify': 'window.sentNotify',
'Aliplayer'
:
'window.Aliplayer'
,
'AliPlayerComponent'
:
'window.AliPlayerComponent'
}
}
},
},
ProvidePlugin
:
{
ProvidePlugin
:
{
...
...
client/.config.pro.js
浏览文件 @
09d70db6
...
@@ -4,7 +4,12 @@ module.exports = {
...
@@ -4,7 +4,12 @@ module.exports = {
apiBaseURL
:
'//api.ezijing.com/'
,
apiBaseURL
:
'//api.ezijing.com/'
,
webpack
:
{
webpack
:
{
externals
:
{
externals
:
{
'CKEDITOR'
:
'window.CKEDITOR'
'CKEDITOR'
:
'window.CKEDITOR'
,
'VideoJs'
:
'window.swfobject'
,
'Base64'
:
'window.Base64'
,
// 'sentNotify': 'window.sentNotify',
'Aliplayer'
:
'window.Aliplayer'
,
'AliPlayerComponent'
:
'window.AliPlayerComponent'
}
}
},
},
ProvidePlugin
:
{
ProvidePlugin
:
{
...
...
client/.config.test.js
浏览文件 @
09d70db6
...
@@ -4,7 +4,12 @@ module.exports = {
...
@@ -4,7 +4,12 @@ module.exports = {
apiBaseURL
:
'//api.ezijing.com/'
,
apiBaseURL
:
'//api.ezijing.com/'
,
webpack
:
{
webpack
:
{
externals
:
{
externals
:
{
'CKEDITOR'
:
'window.CKEDITOR'
'CKEDITOR'
:
'window.CKEDITOR'
,
'VideoJs'
:
'window.swfobject'
,
'Base64'
:
'window.Base64'
,
// 'sentNotify': 'window.sentNotify',
'Aliplayer'
:
'window.Aliplayer'
,
'AliPlayerComponent'
:
'window.AliPlayerComponent'
}
}
},
},
ProvidePlugin
:
{
ProvidePlugin
:
{
...
...
client/src/index.html
浏览文件 @
09d70db6
...
@@ -14,6 +14,17 @@
...
@@ -14,6 +14,17 @@
<script
type=
"text/javascript"
src=
"https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-sham.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-sham.min.js"
></script>
<!-- 三方插件引入 -->
<!-- 三方插件引入 -->
<script
type=
"text/javascript"
src=
"https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/ckeditor/ckeditor.js"
></script>
<script
type=
"text/javascript"
src=
"https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/ckeditor/ckeditor.js"
></script>
<script
type=
"text/javascript"
src=
"https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/videoJs/videoJs.js"
></script>
<script
type=
"text/javascript"
src=
"https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/convertString/base64-new.js"
></script>
<!-- <script type="text/javascript" src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/notify/notification.js"></script> -->
<!-- <script type="text/javascript" src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/errorCollection/collection.js"></script> -->
<!-- 直接引入aliyun播放插件 JS -->
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"https://player.alicdn.com/aliplayer/presentation/js/aliplayercomponents.min.js"
></script>
<!-- 解决iframe嵌套,CC视频在safri中打开免登陆兼容问题 -->
<script
src=
"//view.csslcloud.net/js/_fix_.js"
></script>
<script
src=
"//view.csslcloud.net/js/jquery-1.9.0.min.js"
type=
"text/javascript"
></script>
<script
src=
"//view.csslcloud.net/js/sdk/3.1.0/liveSDK.js"
type=
"text/javascript"
></script>
<!--[if lt IE 9]>
<!--[if lt IE 9]>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/console-polyfill.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/console-polyfill.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/html5shiv.min.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/html5shiv.min.js"></script>
...
...
client/src/pages/player/chapterExam/chapterExam.vue
浏览文件 @
09d70db6
...
@@ -351,7 +351,7 @@ export default {
...
@@ -351,7 +351,7 @@ export default {
loadAjax
()
{
loadAjax
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
cAction
.
Player
.
getExamDetail
(
this
.
sid
,
this
.
cid
,
this
.
id
).
then
(
_data
=>
{
cAction
.
Player
.
getExamDetail
(
this
.
sid
,
this
.
cid
,
this
.
id
).
then
(
_data
=>
{
le
t
json
=
_data
.
homework
cons
t
json
=
_data
.
homework
if
(
json
)
{
if
(
json
)
{
json
.
score
=
_data
.
score
json
.
score
=
_data
.
score
json
.
work_contents
=
_data
.
work_contents
json
.
work_contents
=
_data
.
work_contents
...
...
client/src/pages/player/chapterVideo/videoH5.vue
浏览文件 @
09d70db6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
cAction
from
'@action
s
'
import
cAction
from
'@action'
import
Aliplayer
from
'Aliplayer'
import
Aliplayer
from
'Aliplayer'
import
AliPlayerComponent
from
'AliPlayerComponent'
import
AliPlayerComponent
from
'AliPlayerComponent'
import
Base64
from
'Base64'
import
Base64
from
'Base64'
...
@@ -57,7 +57,7 @@ export default {
...
@@ -57,7 +57,7 @@ export default {
/* 注意 flash 初始化时,需要页面DOM存在 + videoId存在 */
/* 注意 flash 初始化时,需要页面DOM存在 + videoId存在 */
continueStart
=
this
.
lastTime
||
0
// 如果传递有上次播放时间,则记录缓存,以便player.start时使用
continueStart
=
this
.
lastTime
||
0
// 如果传递有上次播放时间,则记录缓存,以便player.start时使用
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
cAction
.
chapterAction
.
getCurrentChapterDetailAliyun
(
this
.
videoId
).
then
(
json
=>
{
cAction
.
Player
.
getCurrentChapterDetailAliyun
(
this
.
videoId
).
then
(
json
=>
{
this
.
videoArr
=
json
.
video
this
.
videoArr
=
json
.
video
const
player
=
this
.
getPlayer
()
const
player
=
this
.
getPlayer
()
if
(
!
objPlayer
||
!
player
.
innerHTML
)
{
if
(
!
objPlayer
||
!
player
.
innerHTML
)
{
...
@@ -133,8 +133,8 @@ export default {
...
@@ -133,8 +133,8 @@ export default {
_d
.
m3u8Url
=
that
.
videoArr
[
videoPlayer
.
getComponent
(
'QualityComponent'
).
definition
||
'LD'
]
||
''
_d
.
m3u8Url
=
that
.
videoArr
[
videoPlayer
.
getComponent
(
'QualityComponent'
).
definition
||
'LD'
]
||
''
_d
.
m3u8RequestId
=
window
.
G
.
m3u8RequestId
_d
.
m3u8RequestId
=
window
.
G
.
m3u8RequestId
_d
.
UA
=
window
.
navigator
.
userAgent
_d
.
UA
=
window
.
navigator
.
userAgent
var
arr
=
JSON
.
stringify
({
'action'
:
'aliVideoErr'
,
info
:
Base64
.
encode
(
str
),
'auth'
:
'aliVideoErr'
,
'code'
:
Base64
.
encode
(
e
.
paramData
.
error_code
),
'err'
:
Base64
.
encode
(
JSON
.
stringify
(
_d
))
}).
split
(
''
)
var
arr
=
JSON
.
stringify
({
action
:
'aliVideoErr'
,
info
:
Base64
.
encode
(
str
),
auth
:
'aliVideoErr'
,
code
:
Base64
.
encode
(
e
.
paramData
.
error_code
),
err
:
Base64
.
encode
(
JSON
.
stringify
(
_d
))
}).
split
(
''
)
// var arr = JSON.stringify({
'action': 'aliVideoErr', info: Base64.encode(str), 'auth': 'aliVideoErr', 'code'
: Base64.encode('4006') }).split('')
// var arr = JSON.stringify({
action: 'aliVideoErr', info: Base64.encode(str), auth: 'aliVideoErr', code
: Base64.encode('4006') }).split('')
var
strArr
=
[]
var
strArr
=
[]
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
strArr
[
i
]
=
arr
[
i
].
charCodeAt
()
strArr
[
i
]
=
arr
[
i
].
charCodeAt
()
...
@@ -152,7 +152,7 @@ export default {
...
@@ -152,7 +152,7 @@ export default {
continueStart
=
videoPlayer
.
getCurrentTime
()
continueStart
=
videoPlayer
.
getCurrentTime
()
/* 当视频过期时,重新 获取接口 更改播放地址 重新播放 */
/* 当视频过期时,重新 获取接口 更改播放地址 重新播放 */
const
loading
=
that
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
const
loading
=
that
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
cAction
.
chapterAction
.
getCurrentChapterDetailAliyun
(
that
.
videoId
).
then
(
json
=>
{
cAction
.
Player
.
getCurrentChapterDetailAliyun
(
that
.
videoId
).
then
(
json
=>
{
that
.
videoArr
=
json
.
video
that
.
videoArr
=
json
.
video
const
player
=
that
.
getPlayer
()
const
player
=
that
.
getPlayer
()
if
(
!
objPlayer
||
!
player
.
innerHTML
)
{
if
(
!
objPlayer
||
!
player
.
innerHTML
)
{
...
...
client/src/pages/player/chapterWork/chapterWork.vue
浏览文件 @
09d70db6
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
if
(
document
.
querySelector
(
'#editor-chapterWork'
))
{
if
(
document
.
querySelector
(
'#editor-chapterWork'
))
{
this
.
initckeditor
()
this
.
initckeditor
()
if
(
this
.
homeData
.
work_contents
)
{
if
(
this
.
homeData
.
work_contents
)
{
le
t
json
=
JSON
.
parse
(
this
.
homeData
.
work_contents
)
cons
t
json
=
JSON
.
parse
(
this
.
homeData
.
work_contents
)
if
(
json
[
0
].
is_encoded
)
{
if
(
json
[
0
].
is_encoded
)
{
json
[
0
].
descreption
=
Base64
.
decode
(
json
[
0
].
descreption
)
json
[
0
].
descreption
=
Base64
.
decode
(
json
[
0
].
descreption
)
}
}
...
@@ -151,7 +151,7 @@ export default {
...
@@ -151,7 +151,7 @@ export default {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
cAction
.
Player
.
getHomeworkStopTime
(
this
.
sid
,
this
.
cid
,
this
.
chapterId
).
then
(
data
=>
{
cAction
.
Player
.
getHomeworkStopTime
(
this
.
sid
,
this
.
cid
,
this
.
chapterId
).
then
(
data
=>
{
this
.
deadLine
=
data
.
dead_line
||
''
this
.
deadLine
=
data
.
dead_line
||
''
le
t
deadLine
=
data
.
dead_line
?
new
Date
(
data
.
dead_line
).
getTime
()
:
''
cons
t
deadLine
=
data
.
dead_line
?
new
Date
(
data
.
dead_line
).
getTime
()
:
''
// deadLine = new Date().getTime() - 100
// deadLine = new Date().getTime() - 100
this
.
deadLineFlag
=
((
new
Date
().
getTime
()
>
deadLine
)
&&
!!
deadLine
)
this
.
deadLineFlag
=
((
new
Date
().
getTime
()
>
deadLine
)
&&
!!
deadLine
)
// console.log(this.deadLine)
// console.log(this.deadLine)
...
@@ -165,7 +165,7 @@ export default {
...
@@ -165,7 +165,7 @@ export default {
}
}
/* 只能提交 单个问题 */
/* 只能提交 单个问题 */
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
le
t
str
=
JSON
.
stringify
([{
cons
t
str
=
JSON
.
stringify
([{
question_id
:
this
.
chapterWork
.
questions
[
0
].
id
,
question_id
:
this
.
chapterWork
.
questions
[
0
].
id
,
descreption
:
Base64
.
encode
(
this
.
ckeditor
.
getData
()),
descreption
:
Base64
.
encode
(
this
.
ckeditor
.
getData
()),
file_url
:
this
.
successFileUrl
,
file_url
:
this
.
successFileUrl
,
...
@@ -205,18 +205,18 @@ export default {
...
@@ -205,18 +205,18 @@ export default {
filebrowserImageUploadUrl
:
'/api/ckeditor/img/upload'
,
filebrowserImageUploadUrl
:
'/api/ckeditor/img/upload'
,
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
toolbar
:
[
toolbar
:
[
// { name: 'document', items: [
'Source', '-', 'Save', 'NewPage', 'Preview'
] },
// { name: 'document', items: [
'Source', '-', 'Save', 'NewPage', 'Preview'
] },
{
name
:
'styles'
,
items
:
[
'Styles'
,
'Format'
,
'Font'
,
'FontSize'
]
},
{
name
:
'styles'
,
items
:
[
'Styles'
,
'Format'
,
'Font'
,
'FontSize'
]
},
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
]
},
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
]
},
// { name: 'clipboard', items: [
'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'
] },
// { name: 'clipboard', items: [
'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'
] },
{
name
:
'editing'
,
items
:
[
'Find'
,
'Replace'
]
},
{
name
:
'editing'
,
items
:
[
'Find'
,
'Replace'
]
},
// { name: 'forms', items: [
'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'
] },
// { name: 'forms', items: [
'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'
] },
'/'
,
'/'
,
{
name
:
'basicstyles'
,
items
:
[
'Bold'
,
'Italic'
,
'Underline'
,
'Strike'
,
'Subscript'
,
'Superscript'
,
'-'
,
'RemoveFormat'
]
},
{
name
:
'basicstyles'
,
items
:
[
'Bold'
,
'Italic'
,
'Underline'
,
'Strike'
,
'Subscript'
,
'Superscript'
,
'-'
,
'RemoveFormat'
]
},
{
name
:
'paragraph'
,
items
:
[
'NumberedList'
,
'BulletedList'
,
'-'
,
'Outdent'
,
'Indent'
,
'-'
,
'Blockquote'
,
'CreateDiv'
,
'-'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'JustifyBlock'
,
'-'
,
'BidiLtr'
,
'BidiRtl'
]
},
{
name
:
'paragraph'
,
items
:
[
'NumberedList'
,
'BulletedList'
,
'-'
,
'Outdent'
,
'Indent'
,
'-'
,
'Blockquote'
,
'CreateDiv'
,
'-'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'JustifyBlock'
,
'-'
,
'BidiLtr'
,
'BidiRtl'
]
},
{
name
:
'links'
,
items
:
[
'Link'
,
'Unlink'
,
'Anchor'
]
},
{
name
:
'links'
,
items
:
[
'Link'
,
'Unlink'
,
'Anchor'
]
},
{
name
:
'insert'
,
items
:
[
'Image'
,
'Table'
,
'HorizontalRule'
]
}
{
name
:
'insert'
,
items
:
[
'Image'
,
'Table'
,
'HorizontalRule'
]
}
]
]
}))
}))
}
}
...
...
client/src/pages/player/courseWork/courseWork.vue
浏览文件 @
09d70db6
...
@@ -128,7 +128,7 @@ export default {
...
@@ -128,7 +128,7 @@ export default {
if
(
document
.
querySelector
(
'#editor-courseWork'
))
{
if
(
document
.
querySelector
(
'#editor-courseWork'
))
{
this
.
initckeditor
()
this
.
initckeditor
()
if
(
this
.
homeData
.
course_id
)
{
if
(
this
.
homeData
.
course_id
)
{
le
t
json
=
this
.
homeData
cons
t
json
=
this
.
homeData
this
.
successFileUrl
=
json
.
file_url
this
.
successFileUrl
=
json
.
file_url
this
.
ckeditor
.
setData
(
json
.
essay_description
)
this
.
ckeditor
.
setData
(
json
.
essay_description
)
this
.
title
=
json
.
essay_name
this
.
title
=
json
.
essay_name
...
@@ -154,7 +154,7 @@ export default {
...
@@ -154,7 +154,7 @@ export default {
}
}
/* 只能提交 单个问题 */
/* 只能提交 单个问题 */
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
le
t
_strContent
=
this
.
ckeditor
.
getData
()
cons
t
_strContent
=
this
.
ckeditor
.
getData
()
.
replace
(
/<
(
a|b|p|em|span|strong|table|tbody|thead|th|tr|td|div
)
.*
?
>/gi
,
''
)
.
replace
(
/<
(
a|b|p|em|span|strong|table|tbody|thead|th|tr|td|div
)
.*
?
>/gi
,
''
)
.
replace
(
/<
\/
.*
?
>/gi
,
''
)
.
replace
(
/<
\/
.*
?
>/gi
,
''
)
...
@@ -197,18 +197,18 @@ export default {
...
@@ -197,18 +197,18 @@ export default {
filebrowserImageUploadUrl
:
'/api/ckeditor/img/upload'
,
filebrowserImageUploadUrl
:
'/api/ckeditor/img/upload'
,
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
toolbar
:
[
toolbar
:
[
// { name: 'document', items: [
'Source', '-', 'Save', 'NewPage', 'Preview'
] },
// { name: 'document', items: [
'Source', '-', 'Save', 'NewPage', 'Preview'
] },
{
name
:
'styles'
,
items
:
[
'Styles'
,
'Format'
,
'Font'
,
'FontSize'
]
},
{
name
:
'styles'
,
items
:
[
'Styles'
,
'Format'
,
'Font'
,
'FontSize'
]
},
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
]
},
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
]
},
// { name: 'clipboard', items: [
'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'
] },
// { name: 'clipboard', items: [
'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'
] },
{
name
:
'editing'
,
items
:
[
'Find'
,
'Replace'
]
},
{
name
:
'editing'
,
items
:
[
'Find'
,
'Replace'
]
},
// { name: 'forms', items: [
'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'
] },
// { name: 'forms', items: [
'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'
] },
'/'
,
'/'
,
{
name
:
'basicstyles'
,
items
:
[
'Bold'
,
'Italic'
,
'Underline'
,
'Strike'
,
'Subscript'
,
'Superscript'
,
'-'
,
'RemoveFormat'
]
},
{
name
:
'basicstyles'
,
items
:
[
'Bold'
,
'Italic'
,
'Underline'
,
'Strike'
,
'Subscript'
,
'Superscript'
,
'-'
,
'RemoveFormat'
]
},
{
name
:
'paragraph'
,
items
:
[
'NumberedList'
,
'BulletedList'
,
'-'
,
'Outdent'
,
'Indent'
,
'-'
,
'Blockquote'
,
'CreateDiv'
,
'-'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'JustifyBlock'
,
'-'
,
'BidiLtr'
,
'BidiRtl'
]
},
{
name
:
'paragraph'
,
items
:
[
'NumberedList'
,
'BulletedList'
,
'-'
,
'Outdent'
,
'Indent'
,
'-'
,
'Blockquote'
,
'CreateDiv'
,
'-'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'JustifyBlock'
,
'-'
,
'BidiLtr'
,
'BidiRtl'
]
},
{
name
:
'links'
,
items
:
[
'Link'
,
'Unlink'
,
'Anchor'
]
},
{
name
:
'links'
,
items
:
[
'Link'
,
'Unlink'
,
'Anchor'
]
},
{
name
:
'insert'
,
items
:
[
'Image'
,
'Table'
,
'HorizontalRule'
]
}
{
name
:
'insert'
,
items
:
[
'Image'
,
'Table'
,
'HorizontalRule'
]
}
]
]
}))
}))
}
}
...
...
client/src/pages/player/exam/exam.vue
浏览文件 @
09d70db6
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<!-- 简答题 -->
<!-- 简答题 -->
<
template
v-if=
'exam.shortAnswerList.length'
>
<
template
v-if=
'exam.shortAnswerList.length'
>
<template
v-for=
'(item, index) in exam.shortAnswerList'
>
<template
v-for=
'(item, index) in exam.shortAnswerList'
>
<div
class=
'q-group'
>
<div
v-bind:key=
"index"
class=
'q-group'
>
<div
class=
'q-sa-title'
>
{{
exam
.
radioList
.
length
+
exam
.
checkboxList
.
length
+
index
+
1
}}
.
简答题
</div>
<div
class=
'q-sa-title'
>
{{
exam
.
radioList
.
length
+
exam
.
checkboxList
.
length
+
index
+
1
}}
.
简答题
</div>
<div
class=
"edit_html"
v-html=
"item.content || ''"
></div>
<div
class=
"edit_html"
v-html=
"item.content || ''"
></div>
<textarea
:id=
"('editor-exam' + index)"
v-model=
"item.user_answer"
></textarea>
<textarea
:id=
"('editor-exam' + index)"
v-model=
"item.user_answer"
></textarea>
...
@@ -296,7 +296,7 @@ export default {
...
@@ -296,7 +296,7 @@ export default {
if
(
!
this
.
exam
.
shortAnswerList
)
{
return
}
if
(
!
this
.
exam
.
shortAnswerList
)
{
return
}
/* 删除所有 ckeditor 实例 */
/* 删除所有 ckeditor 实例 */
const
instances
=
CKEDITOR
.
instances
const
instances
=
CKEDITOR
.
instances
for
(
le
t
name
in
instances
)
{
instances
[
name
].
destroy
()
}
for
(
cons
t
name
in
instances
)
{
instances
[
name
].
destroy
()
}
for
(
let
i
=
0
;
i
<
this
.
exam
.
shortAnswerList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
exam
.
shortAnswerList
.
length
;
i
++
)
{
if
(
!
instances
[
'editor-exam'
+
i
])
{
if
(
!
instances
[
'editor-exam'
+
i
])
{
CKEDITOR
.
replace
(
'editor-exam'
+
i
,
{
CKEDITOR
.
replace
(
'editor-exam'
+
i
,
{
...
@@ -305,18 +305,18 @@ export default {
...
@@ -305,18 +305,18 @@ export default {
filebrowserImageUploadUrl
:
'/api/ckeditor/img/upload'
,
filebrowserImageUploadUrl
:
'/api/ckeditor/img/upload'
,
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
toolbar
:
[
toolbar
:
[
// { name: 'document', items: [
'Source', '-', 'Save', 'NewPage', 'Preview'
] },
// { name: 'document', items: [
'Source', '-', 'Save', 'NewPage', 'Preview'
] },
{
name
:
'styles'
,
items
:
[
'Styles'
,
'Format'
,
'Font'
,
'FontSize'
]
},
{
name
:
'styles'
,
items
:
[
'Styles'
,
'Format'
,
'Font'
,
'FontSize'
]
},
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
]
},
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
]
},
// { name: 'clipboard', items: [
'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'
] },
// { name: 'clipboard', items: [
'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'
] },
{
name
:
'editing'
,
items
:
[
'Find'
,
'Replace'
]
},
{
name
:
'editing'
,
items
:
[
'Find'
,
'Replace'
]
},
// { name: 'forms', items: [
'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'
] },
// { name: 'forms', items: [
'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'
] },
'/'
,
'/'
,
{
name
:
'basicstyles'
,
items
:
[
'Bold'
,
'Italic'
,
'Underline'
,
'Strike'
,
'Subscript'
,
'Superscript'
,
'-'
,
'RemoveFormat'
]
},
{
name
:
'basicstyles'
,
items
:
[
'Bold'
,
'Italic'
,
'Underline'
,
'Strike'
,
'Subscript'
,
'Superscript'
,
'-'
,
'RemoveFormat'
]
},
{
name
:
'paragraph'
,
items
:
[
'NumberedList'
,
'BulletedList'
,
'-'
,
'Outdent'
,
'Indent'
,
'-'
,
'Blockquote'
,
'CreateDiv'
,
'-'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'JustifyBlock'
,
'-'
,
'BidiLtr'
,
'BidiRtl'
]
},
{
name
:
'paragraph'
,
items
:
[
'NumberedList'
,
'BulletedList'
,
'-'
,
'Outdent'
,
'Indent'
,
'-'
,
'Blockquote'
,
'CreateDiv'
,
'-'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'JustifyBlock'
,
'-'
,
'BidiLtr'
,
'BidiRtl'
]
},
{
name
:
'links'
,
items
:
[
'Link'
,
'Unlink'
,
'Anchor'
]
},
{
name
:
'links'
,
items
:
[
'Link'
,
'Unlink'
,
'Anchor'
]
},
{
name
:
'insert'
,
items
:
[
'Image'
,
'Table'
,
'HorizontalRule'
]
}
{
name
:
'insert'
,
items
:
[
'Image'
,
'Table'
,
'HorizontalRule'
]
}
]
]
})
})
}
}
...
@@ -370,10 +370,10 @@ export default {
...
@@ -370,10 +370,10 @@ export default {
this
.
$message
.
error
(
'已做过,不能再提交'
)
this
.
$message
.
error
(
'已做过,不能再提交'
)
return
return
}
}
le
t
body
=
{
answers
:
{},
type
:
!
e
.
submitType
?
1
:
0
}
// type: 0 缓存;type: 1 提交
cons
t
body
=
{
answers
:
{},
type
:
!
e
.
submitType
?
1
:
0
}
// type: 0 缓存;type: 1 提交
body
.
answers
.
radioList
=
[]
body
.
answers
.
radioList
=
[]
for
(
let
i
=
0
;
i
<
this
.
exam
.
radioList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
exam
.
radioList
.
length
;
i
++
)
{
le
t
tmp
=
this
.
exam
.
radioList
[
i
]
cons
t
tmp
=
this
.
exam
.
radioList
[
i
]
if
(
!
tmp
.
user_answer
&&
!
e
.
submitType
)
{
if
(
!
tmp
.
user_answer
&&
!
e
.
submitType
)
{
this
.
$message
.
error
(
'还有单选题未做,不能提交'
)
this
.
$message
.
error
(
'还有单选题未做,不能提交'
)
return
return
...
@@ -385,7 +385,7 @@ export default {
...
@@ -385,7 +385,7 @@ export default {
}
}
body
.
answers
.
checkboxList
=
[]
body
.
answers
.
checkboxList
=
[]
for
(
let
i
=
0
;
i
<
this
.
exam
.
checkboxList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
exam
.
checkboxList
.
length
;
i
++
)
{
le
t
tmp
=
this
.
exam
.
checkboxList
[
i
]
cons
t
tmp
=
this
.
exam
.
checkboxList
[
i
]
if
(
!
tmp
.
user_answer
.
length
&&
!
e
.
submitType
)
{
if
(
!
tmp
.
user_answer
.
length
&&
!
e
.
submitType
)
{
this
.
$message
.
error
(
'还有多选题未做,不能提交'
)
this
.
$message
.
error
(
'还有多选题未做,不能提交'
)
return
return
...
@@ -397,7 +397,7 @@ export default {
...
@@ -397,7 +397,7 @@ export default {
}
}
body
.
answers
.
shortAnswerList
=
[]
body
.
answers
.
shortAnswerList
=
[]
for
(
let
i
=
0
;
i
<
this
.
exam
.
shortAnswerList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
exam
.
shortAnswerList
.
length
;
i
++
)
{
le
t
tmp
=
this
.
exam
.
shortAnswerList
[
i
]
cons
t
tmp
=
this
.
exam
.
shortAnswerList
[
i
]
tmp
.
user_answer
=
tmp
.
ckeditor
.
getData
()
tmp
.
user_answer
=
tmp
.
ckeditor
.
getData
()
if
(
!
tmp
.
user_answer
&&
!
e
.
submitType
)
{
if
(
!
tmp
.
user_answer
&&
!
e
.
submitType
)
{
this
.
$message
.
error
(
'还有简答题未做,不能提交'
)
this
.
$message
.
error
(
'还有简答题未做,不能提交'
)
...
@@ -424,9 +424,9 @@ export default {
...
@@ -424,9 +424,9 @@ export default {
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
},
},
_SubmitMouseLeftDown
()
{
_SubmitMouseLeftDown
()
{
le
t
_fn1
=
this
.
repeatExam
.
bind
(
this
,
false
)
cons
t
_fn1
=
this
.
repeatExam
.
bind
(
this
,
false
)
document
.
addEventListener
(
'keydown'
,
_fn1
,
false
)
document
.
addEventListener
(
'keydown'
,
_fn1
,
false
)
le
t
_fn3
=
function
()
{
cons
t
_fn3
=
function
()
{
document
.
removeEventListener
(
'keydown'
,
_fn1
)
document
.
removeEventListener
(
'keydown'
,
_fn1
)
document
.
removeEventListener
(
'mouseup'
,
_fn3
)
document
.
removeEventListener
(
'mouseup'
,
_fn3
)
}
}
...
...
client/src/pages/player/index.vue
浏览文件 @
09d70db6
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<
script
>
<
script
>
import
cAction
from
'@action'
import
cAction
from
'@action'
import
cTool
from
'@tool
s
'
import
cTool
from
'@tool'
import
sideChapterList
from
'./rightSide/sideChapterList.vue'
import
sideChapterList
from
'./rightSide/sideChapterList.vue'
import
sideChapterPpt
from
'./rightSide/sideChapterPpt.vue'
import
sideChapterPpt
from
'./rightSide/sideChapterPpt.vue'
...
...
client/src/router/routes.js
浏览文件 @
09d70db6
...
@@ -90,63 +90,63 @@ export default [
...
@@ -90,63 +90,63 @@ export default [
]
]
},
},
/* 学习系统 - player */
/* 学习系统 - player */
//
{
{
//
path: '/player/:sid/:cid',
path
:
'/player/:sid/:cid'
,
//
redirect: '/player/0/0/error/404',
redirect
:
'/player/0/0/error/404'
,
//
component: () => import('@/pages/player/index.vue'),
component
:
()
=>
import
(
'@/pages/player/index.vue'
),
//
props: true,
props
:
true
,
//
children: [
children
:
[
//
{ path: 'error/404', component: () => import('@/components/errorPages/404.vue') },
{
path
:
'error/404'
,
component
:
()
=>
import
(
'@/components/errorPages/404.vue'
)
},
//
{
{
//
path: 'chapter-video/:id/:videoType',
path
:
'chapter-video/:id/:videoType'
,
//
name: 'video',
name
:
'video'
,
//
component: () => import('@/pages/player/chapterVideo/chapterVideo.vue'),
component
:
()
=>
import
(
'@/pages/player/chapterVideo/chapterVideo.vue'
),
//
props: true
props
:
true
//
},
},
//
{
{
//
path: 'chapter-exam/:id',
path
:
'chapter-exam/:id'
,
//
name: 'chapterExam',
name
:
'chapterExam'
,
//
component: () => import('@/pages/player/chapterExam/chapterExam.vue'),
component
:
()
=>
import
(
'@/pages/player/chapterExam/chapterExam.vue'
),
//
props: true
props
:
true
//
},
},
//
{
{
//
path: 'chapter-read/:id',
path
:
'chapter-read/:id'
,
//
name: 'chapterRead',
name
:
'chapterRead'
,
//
component: () => import('@/pages/player/chapterRead/chapterRead.vue'),
component
:
()
=>
import
(
'@/pages/player/chapterRead/chapterRead.vue'
),
//
props: true
props
:
true
//
},
},
//
{
{
//
path: 'chapter-work/:id',
path
:
'chapter-work/:id'
,
//
name: 'chapterWork',
name
:
'chapterWork'
,
//
component: () => import('@/pages/player/chapterWork/chapterWork.vue'),
component
:
()
=>
import
(
'@/pages/player/chapterWork/chapterWork.vue'
),
//
props: true
props
:
true
//
},
},
//
{
{
//
path: 'course-info/:id',
path
:
'course-info/:id'
,
//
name: 'courseInfo',
name
:
'courseInfo'
,
//
component: () => import('@/pages/player/courseInfo/courseInfo.vue'),
component
:
()
=>
import
(
'@/pages/player/courseInfo/courseInfo.vue'
),
//
props: true
props
:
true
//
},
},
//
{
{
//
path: 'course-work/:id',
path
:
'course-work/:id'
,
//
name: 'courseWork',
name
:
'courseWork'
,
//
component: () => import('@/pages/player/courseWork/courseWork.vue'),
component
:
()
=>
import
(
'@/pages/player/courseWork/courseWork.vue'
),
//
props: true
props
:
true
//
},
},
//
{
{
//
path: 'exam/:id',
path
:
'exam/:id'
,
//
name: 'exam',
name
:
'exam'
,
//
component: () => import('@/pages/player/exam/exam.vue'),
component
:
()
=>
import
(
'@/pages/player/exam/exam.vue'
),
//
props: true
props
:
true
//
},
},
//
{
{
//
path: 'live/:id',
path
:
'live/:id'
,
//
name: 'live',
name
:
'live'
,
//
component: () => import('@/pages/player/live/live.vue'),
component
:
()
=>
import
(
'@/pages/player/live/live.vue'
),
//
props: true
props
:
true
//
}
}
//
]
]
//
},
},
/* 如果所有页面都没找到 - 指向 */
/* 如果所有页面都没找到 - 指向 */
{
path
:
'*'
,
component
:
()
=>
import
(
'@/components/errorPages/404.vue'
)
}
{
path
:
'*'
,
component
:
()
=>
import
(
'@/components/errorPages/404.vue'
)
}
]
]
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论