Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
f8d02f15
提交
f8d02f15
authored
1月 26, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
章节增加考试
上级
c2f07248
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
36 行增加
和
15 行删除
+36
-15
course.js
src/api/course.js
+4
-4
aside.vue
src/components/layout/aside.vue
+6
-3
CourseChapter.vue
src/pages/course/learn/components/CourseChapter.vue
+24
-1
index.vue
src/pages/exam/courseExam/chapter/index.vue
+1
-6
axios.js
src/utils/axios.js
+1
-1
没有找到文件。
src/api/course.js
浏览文件 @
f8d02f15
...
@@ -19,10 +19,10 @@ export function getCourseList() {
...
@@ -19,10 +19,10 @@ export function getCourseList() {
*/
*/
export
function
getCourse
(
courseId
)
{
export
function
getCourse
(
courseId
)
{
return
httpRequest
.
get
(
`/api/zy/v2/education/courses/
${
courseId
}
`
).
then
(
response
=>
{
return
httpRequest
.
get
(
`/api/zy/v2/education/courses/
${
courseId
}
`
).
then
(
response
=>
{
response
.
chapters
=
response
.
chapters
.
filter
(
item
=>
{
//
response.chapters = response.chapters.filter(item => {
item
.
children
=
item
.
children
.
filter
(
child
=>
child
.
type
===
2
)
//
item.children = item.children.filter(child => child.type === 2)
return
item
.
children
.
length
//
return item.children.length
})
//
})
return
response
return
response
})
})
}
}
...
...
src/components/layout/aside.vue
浏览文件 @
f8d02f15
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
:index=
"item.path"
:index=
"item.path"
:key=
"item.title"
:key=
"item.title"
v-for=
"item in item.children"
v-for=
"item in item.children"
@
click=
"handleClick(item.path)"
@
click=
"handleClick(item.path
, item
)"
>
>
<
template
#
title
>
<
template
#
title
>
<template
v-if=
"item.href"
>
<template
v-if=
"item.href"
>
...
@@ -69,7 +69,9 @@ export default {
...
@@ -69,7 +69,9 @@ export default {
{
{
title
:
'实训练习'
,
title
:
'实训练习'
,
icon
:
'icon-kaoshihong'
,
icon
:
'icon-kaoshihong'
,
children
:
[{
title
:
'实训案例练习'
,
href
:
'https://xtraining.ezijing.com/'
}]
children
:
[
{
title
:
'实训案例练习'
,
path
:
'https://xtraining.ezijing.com/'
,
href
:
'https://xtraining.ezijing.com/'
}
]
},
},
{
{
title
:
'个人中心'
,
title
:
'个人中心'
,
...
@@ -125,7 +127,8 @@ export default {
...
@@ -125,7 +127,8 @@ export default {
window
.
location
.
href
=
webConf
.
others
.
loginUrl
window
.
location
.
href
=
webConf
.
others
.
loginUrl
})
})
},
},
handleClick
(
path
)
{
handleClick
(
path
,
item
)
{
if
(
item
.
href
)
return
path
&&
this
.
$router
.
push
(
path
)
path
&&
this
.
$router
.
push
(
path
)
}
}
}
}
...
...
src/pages/course/learn/components/CourseChapter.vue
浏览文件 @
f8d02f15
...
@@ -5,7 +5,21 @@
...
@@ -5,7 +5,21 @@
<li
v-for=
"subItem in item.children"
:key=
"subItem.id"
@
click=
"handleClick(subItem)"
>
<li
v-for=
"subItem in item.children"
:key=
"subItem.id"
@
click=
"handleClick(subItem)"
>
<div
class=
"name"
>
{{
subItem
.
name
}}
</div>
<div
class=
"name"
>
{{
subItem
.
name
}}
</div>
<div
class=
"duration"
>
{{
subItem
.
duration
}}
</div>
<div
class=
"duration"
>
{{
subItem
.
duration
}}
</div>
<div
class=
"progress"
v-if=
"showProgress"
>
{{
progressText
(
subItem
.
video_progress
)
}}
</div>
<div
class=
"progress"
v-if=
"showProgress && subItem.type === 2"
>
{{
progressText
(
subItem
.
video_progress
)
}}
</div>
<div
class=
"buttons"
v-if=
"subItem.type === 9"
>
<el-button
round
size=
"mini"
v-if=
"subItem.status === 100"
@
click=
"toExamPage(subItem, 1)"
>
测试
</el-button>
<el-button
round
size=
"mini"
v-if=
"[0, 3].includes(subItem.status)"
@
click=
"toExamPage(subItem, 2)"
>
继续测试
</el-button>
<template
v-if=
"[1, 2].includes(subItem.status)"
>
<el-button
round
size=
"mini"
@
click=
"toExamPage(subItem, 1)"
>
重新测试
</el-button>
<el-button
round
size=
"mini"
@
click=
"toExamPage(subItem, 3)"
>
报告
</el-button>
</
template
>
</div>
</li>
</li>
</ul>
</ul>
</el-collapse-item>
</el-collapse-item>
...
@@ -36,8 +50,17 @@ export default {
...
@@ -36,8 +50,17 @@ export default {
return
`已学
${
value
}
%`
return
`已学
${
value
}
%`
},
},
handleClick
(
data
)
{
handleClick
(
data
)
{
if
(
data
.
type
===
2
)
{
this
.
$router
.
push
({
name
:
'viewerCourseChapter'
,
params
:
{
cid
:
this
.
courseId
,
id
:
data
.
id
}
})
this
.
$router
.
push
({
name
:
'viewerCourseChapter'
,
params
:
{
cid
:
this
.
courseId
,
id
:
data
.
id
}
})
}
}
},
toExamPage
(
data
,
type
)
{
const
path
=
type
===
3
?
'/course/chapter/result'
:
'/course/exam/chapter'
this
.
$router
.
push
({
path
:
path
,
query
:
{
course_id
:
this
.
courseId
,
chapter_id
:
data
.
id
,
type
}
})
}
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/exam/courseExam/chapter/index.vue
浏览文件 @
f8d02f15
...
@@ -28,12 +28,7 @@
...
@@ -28,12 +28,7 @@
<!-- @click="confirmBtn" -->
<!-- @click="confirmBtn" -->
<div
class=
"foot"
id=
"foot-h"
>
<div
class=
"foot"
id=
"foot-h"
>
<div
class=
"exam-btn"
>
<div
class=
"exam-btn"
>
<div
class=
"confirm"
<div
class=
"confirm"
@
click=
"confirmBtn"
>
查看解析
</div>
@
click=
"confirmBtn"
v-if=
"$rou"
>
查看解析
</div>
<div
<div
@
click=
"changeIndex('prev')"
@
click=
"changeIndex('prev')"
:class=
"this.questionParams.questionIndex !== 0 ? 'active' : ''"
:class=
"this.questionParams.questionIndex !== 0 ? 'active' : ''"
...
...
src/utils/axios.js
浏览文件 @
f8d02f15
...
@@ -30,7 +30,7 @@ httpRequest.interceptors.response.use(
...
@@ -30,7 +30,7 @@ httpRequest.interceptors.response.use(
function
(
response
)
{
function
(
response
)
{
const
{
data
}
=
response
const
{
data
}
=
response
if
(
data
.
code
)
{
if
(
data
.
code
)
{
Message
.
error
(
data
.
msg
)
Message
.
error
(
data
.
msg
||
data
.
message
)
return
Promise
.
reject
(
data
)
return
Promise
.
reject
(
data
)
}
}
return
data
return
data
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论