Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
cfbe9bd0
提交
cfbe9bd0
authored
11月 11, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加考试路由跳转
上级
33707f35
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
17 行增加
和
346 行删除
+17
-346
.config.dev.js
.config.dev.js
+1
-1
tag.vue
src/pages/course/learn/tag.vue
+1
-2
CourseChapter.vue
src/pages/course/test/components/CourseChapter.vue
+14
-4
item.vue
src/pages/course/test/item.vue
+1
-1
answerCard.vue
src/pages/my/test/answerCard.vue
+0
-328
collectQuestions.vue
src/pages/my/test/collectQuestions.vue
+0
-0
errorQuestionList.vue
src/pages/my/test/errorQuestionList.vue
+0
-0
index.vue
src/pages/my/test/index.vue
+0
-10
questionsDetails.vue
src/pages/my/test/questionsDetails.vue
+0
-0
questionsList.vue
src/pages/my/test/questionsList.vue
+0
-0
没有找到文件。
.config.dev.js
浏览文件 @
cfbe9bd0
module
.
exports
=
{
domain
:
'dev.ezijing.com'
,
url
:
'https://transport
2
.ezijing.com/api'
,
url
:
'https://transport.ezijing.com/api'
,
webpack
:
{
externals
:
{
CKEDITOR
:
'window.CKEDITOR'
,
...
...
src/pages/course/learn/tag.vue
浏览文件 @
cfbe9bd0
...
...
@@ -56,8 +56,7 @@ export default {
},
// 去知识点考试页面
toExamPage
()
{
const
path
=
`/exam/courseNodeExam?tag_id=
${
this
.
detail
.
id
}
`
this
.
$router
.
push
({
path
})
this
.
$router
.
push
({
path
:
'/course/exam/examSite'
,
query
:
{
tag_id
:
this
.
detail
.
id
}
})
},
// 去课程视频页面
toCourseVideo
()
{
...
...
src/pages/course/test/components/CourseChapter.vue
浏览文件 @
cfbe9bd0
...
...
@@ -6,11 +6,15 @@
<li
v-for=
"subItem in item.children"
:key=
"subItem.id"
>
<div
class=
"name"
>
{{
subItem
.
name
}}
</div>
<div
class=
"buttons"
>
<el-button
round
size=
"mini"
v-if=
"subItem.status === '100'"
>
测试
</el-button>
<el-button
round
size=
"mini"
v-if=
"['0', '3'].includes(subItem.status)"
>
继续测试
</el-button>
<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"
>
重新测试
</el-button>
<el-button
round
size=
"mini"
>
报告
</el-button>
<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>
...
...
@@ -54,6 +58,12 @@ export default {
.
finally
(()
=>
{
this
.
loaded
=
true
})
},
toExamPage
(
data
,
type
)
{
this
.
$router
.
push
({
path
:
'/course/exam/chapter'
,
query
:
{
course_id
:
this
.
courseId
,
chapter_id
:
data
.
id
,
type
}
})
}
},
beforeMount
()
{
...
...
src/pages/course/test/item.vue
浏览文件 @
cfbe9bd0
...
...
@@ -57,7 +57,7 @@ export default {
})
},
onTagClick
(
data
)
{
console
.
log
(
data
)
this
.
$router
.
push
({
path
:
'/course/exam/examSite'
,
query
:
{
tag_id
:
data
.
id
}
}
)
}
},
beforeMount
()
{
...
...
src/pages/my/test/answerCard.vue
deleted
100644 → 0
浏览文件 @
33707f35
<
template
>
<div
class=
"card_box"
>
<div
class=
"head"
id=
"top-view2"
>
<i
class=
"el-icon-arrow-left"
></i>
</div>
<div
id=
"bottom-view2"
>
<div
class=
"card_con"
>
<div
class=
"flag"
>
<ul>
<li>
<div
class=
"circle active1"
></div>
<div
class=
"txt"
>
正确
</div>
</li>
<li>
<div
class=
"circle active2"
></div>
<div
class=
"txt"
>
错误
</div>
</li>
<!--
<li>
<div
class=
"circle active3"
></div>
<div
class=
"txt"
>
未答
</div>
</li>
-->
</ul>
</div>
<div
class=
"question"
>
<div
class=
"tips"
v-if=
"$route.query.type == 1"
>
按答题时间排序,最新错题在前面
</div>
<div
class=
"tips"
v-if=
"$route.query.type == 2"
>
按答题时间排序,最新收藏题在前面
</div>
<ul>
<template
v-for=
"(item, index) in dataList"
>
<li
@
click=
"goQuestionDetail(item.question_id)"
:class=
"item.answer == 1 ? 'active1' : item.answer == 2 ? 'active2' : 'active3'"
:key=
"index"
>
<div
class=
"circle"
>
{{
index
+
1
}}
</div>
<div
class=
"txt"
>
{{
questionType
[
item
.
question_type
]
}}
</div>
</li>
</
template
>
</ul>
<van-empty
description=
"暂无内容"
v-if=
"dataList.length == 0"
/>
<div
class=
"tips"
v-if=
"$route.query.type == 3"
>
未做试题剩余{{unDo}}题
</div>
</div>
</div>
</div>
<div
class=
"clear-btn"
v-if=
"this.$route.query.type != 3"
>
<div
class=
"btn"
@
click=
"clearQuestion"
>
清空记录,重新答题
</div>
</div>
<div
class=
"exam_submit"
v-if=
"isPopShow"
>
<div
class=
"pop"
>
<div
class=
"tit"
></div>
<div
class=
"txt"
>
您确定要清空当前做题记录并重新开始吗?
</div>
<div
class=
"btn_box"
>
<div
class=
"btn"
@
click=
"isPopShow = false"
>
取消
</div>
<div
class=
"btn btn2"
@
click=
"clearQuestion"
>
清空
</div>
</div>
</div>
</div>
</div>
</template>
<
script
>
import
{
Toast
}
from
'vant'
import
*
as
api
from
'@/api/my.js'
export
default
{
components
:
{
[
Toast
.
name
]:
Toast
},
mounted
()
{
this
.
initData
()
},
data
()
{
return
{
unDo
:
0
,
questionType
:
{
1
:
'单选题'
,
2
:
'多选题'
,
5
:
'案例题'
,
6
:
'判断题'
},
dataList
:
[],
isPopShow
:
false
}
},
methods
:
{
clearQuestion
()
{
const
param
=
{
type
:
this
.
$route
.
query
.
type
,
question_type
:
this
.
$route
.
query
.
questionType
,
clear
:
1
}
api
.
cacheQuestion
(
param
).
then
(
res
=>
{
Toast
(
'清空成功'
)
window
.
localStorage
.
cachequestion
=
JSON
.
stringify
([])
this
.
initData
()
})
},
goQuestionDetail
(
id
)
{
const
index
=
this
.
dataList
.
findIndex
(
item
=>
{
return
item
.
question_id
===
id
})
window
.
localStorage
.
myQuestionDetileId
=
id
this
.
$router
.
push
({
name
:
'questionsDetails'
,
query
:
{
type
:
this
.
$route
.
query
.
type
,
questionType
:
this
.
$route
.
query
.
questionType
,
page
:
parseInt
(
index
/
30
)
+
1
}
})
},
initData
()
{
Toast
.
loading
({
message
:
'加载中...'
,
duration
:
5000
,
loadingType
:
'spinner'
})
api
.
getAllQuestion
({
type
:
parseInt
(
this
.
$route
.
query
.
type
)
===
3
?
0
:
this
.
$route
.
query
.
type
,
question_type
:
this
.
$route
.
query
.
questionType
})
.
then
(
res
=>
{
this
.
dataList
=
res
.
list
this
.
unDo
=
res
.
un_do
Toast
.
clear
()
})
.
catch
(()
=>
{
this
.
dataList
=
[]
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.exam_submit
{
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
999999
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
.pop
{
width
:
5
.9rem
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
-webkit-transform
:
translate
(
-50%
,-
50%
);
background
:rgba
(
255
,
255
,
255
,
1
)
;
border-radius
:
.12rem
;
padding
:
0
.4rem
0
;
.tit
{
font-weight
:bold
;
color
:rgba
(
34
,
34
,
34
,
1
)
;
font-size
:
.3rem
;
text-align
:
center
;
line-height
:
100%
;
}
.txt
{
color
:rgba
(
34
,
34
,
34
,
1
)
;
font-size
:
.3rem
;
text-align
:
center
;
line-height
:
100%
;
margin-top
:
.8rem
;
}
.btn_box
{
padding
:
0
0
.2rem
;
display
:
flex
;
margin-top
:
.8rem
;
.btn
{
width
:
2
.6rem
;
height
:
.7rem
;
background
:
#C62245
;
border-radius
:
.12rem
;
text-align
:
center
;
line-height
:
.7rem
;
color
:
#fff
;
font-size
:
.3rem
;
}
.btn2
{
margin-left
:
auto
;
}
}
}
}
.card_box
{
width
:
100%
;
height
:
100%
;
background
:
#fff
;
.card_con
{
padding
:
0
.4rem
;
overflow-y
:
scroll
;
.flag
{
border-bottom
:
0
.01rem
solid
#EEEEEE
;
ul
{
list-style
:
none
;
margin
:
0
;
padding
:
0
;
display
:
flex
;
justify-content
:
center
;
li
{
margin
:
0
.4rem
0
.1rem
.4rem
;
text-align
:
center
;
.circle
{
width
:
.6rem
;
height
:
.6rem
;
border-radius
:
50%
;
font-size
:
.26rem
;
text-align
:
center
;
line-height
:
.6rem
;
color
:
#fff
;
}
.active1
{
background
:
#67C23A
;
}
.active2
{
background
:
#FA5555
;
}
.active3
{
background
:rgba
(
204
,
204
,
204
,
1
)
;
}
.txt
{
color
:
#222222
;
font-size
:
.26rem
;
margin-top
:
0
.1rem
;
}
}
}
}
.question
{
.tips
{
margin-top
:
.4rem
;
font-size
:
.26rem
;
color
:rgba
(
51
,
51
,
51
,
1
)
;
margin-left
:
.6rem
;
}
.title
{
font-size
:
.3rem
;
color
:
#333333
;
margin-top
:
.1rem
;
margin-bottom
:
.4rem
;
}
ul
{
list-style
:
none
;
margin-top
:
.5rem
;
padding
:
0
0
.6rem
;
border-bottom
:
0
.01rem
solid
#EEEEEE
;
display
:
flex
;
flex-wrap
:
wrap
;
li
{
position
:
relative
;
width
:
.6rem
;
height
:
.6rem
;
text-align
:
center
;
margin-right
:
.6rem
;
margin-bottom
:
.4rem
;
padding-bottom
:
.38rem
;
.circle
{
width
:
.6rem
;
height
:
.6rem
;
border-radius
:
50%
;
font-size
:
.26rem
;
line-height
:
.6rem
;
color
:
#fff
;
}
.txt
{
position
:
absolute
;
bottom
:
0
;
left
:
50%
;
-webkit-transform
:
translateX
(
-50%
);
font-size
:
.2rem
;
color
:
#333
;
margin-top
:
.1rem
;
line-height
:
100%
;
white-space
:nowrap
}
}
:nth-child
(
5n
+
5
)
{
margin
:
0
;
}
.active1
{
.circle
{
background
:
#67C23A
;
}
}
.active2
{
.circle
{
background
:
#FA5555
;
}
}
.active3
{
.circle
{
background
:rgba
(
204
,
204
,
204
,
1
)
;
}
}
}
}
}
}
.head
{
color
:
#222
;
display
:
flex
;
padding
:
.4rem
0
;
align-items
:
center
;
i
{
font-size
:
.35rem
;
margin-left
:
.28rem
;
}
.title
{
margin-left
:
.03rem
;
font-size
:
.3rem
;
}
}
#bottom-view2
{
overflow
:
scroll
;
}
.card_box
{
padding-bottom
:
.9rem
;
}
.clear-btn
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
width
:
100%
;
height
:
1rem
;
background
:rgba
(
255
,
255
,
255
,
1
)
;
box-shadow
:
0rem
0rem
.06rem
0rem
rgba
(
0
,
0
,
0
,
0
.05
);
.btn
{
width
:
6
.7rem
;
height
:
.7rem
;
background
:rgba
(
198
,
34
,
69
,
1
)
;
border-radius
:
.12rem
;
font-size
:
.3rem
;
text-align
:
center
;
line-height
:
.7rem
;
color
:
#fff
;
margin
:
.15rem
auto
;
}
}
</
style
>
src/pages/my/test/collectQuestions.vue
deleted
100644 → 0
浏览文件 @
33707f35
差异被折叠。
点击展开。
src/pages/my/test/errorQuestionList.vue
deleted
100644 → 0
浏览文件 @
33707f35
差异被折叠。
点击展开。
src/pages/my/test/index.vue
deleted
100644 → 0
浏览文件 @
33707f35
<
template
>
<app-container>
</app-container>
</
template
>
<
script
>
import
AppContainer
from
'@/components/AppContainer'
export
default
{
components
:
{
AppContainer
}
}
</
script
>
src/pages/my/test/questionsDetails.vue
deleted
100644 → 0
浏览文件 @
33707f35
差异被折叠。
点击展开。
src/pages/my/test/questionsList.vue
deleted
100644 → 0
浏览文件 @
33707f35
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论