Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
70718cf6
提交
70718cf6
authored
7月 01, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updata
上级
b71cdd5a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
127 行增加
和
7 行删除
+127
-7
ExamEnd.vue
src/modules/exam-module/src/ExamEnd.vue
+50
-0
ExamTopic.vue
src/modules/exam-module/src/ExamTopic.vue
+18
-2
answer.vue
src/pages/courseExam/answer.vue
+3
-0
index.vue
src/pages/courseExam/index.vue
+53
-2
index.vue
src/pages/home/index.vue
+3
-3
没有找到文件。
src/modules/exam-module/src/ExamEnd.vue
浏览文件 @
70718cf6
...
@@ -26,6 +26,10 @@
...
@@ -26,6 +26,10 @@
<div
v-if=
"ratioNum == 100"
class=
"txt"
>
成功近在眼前,再接再厉!
</div>
<div
v-if=
"ratioNum == 100"
class=
"txt"
>
成功近在眼前,再接再厉!
</div>
<div
v-else
class=
"txt"
>
您离成功还有一段距离,继续努力!
</div>
<div
v-else
class=
"txt"
>
您离成功还有一段距离,继续努力!
</div>
</div>
</div>
<div
class=
"nl-btn"
v-if=
"title == '能力自测'"
>
<div
class=
"btn"
@
click=
"$router.go(-1)"
>
重做测试
</div>
<div
class=
"btn"
>
学习课程
</div>
</div>
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"tit"
>
答题卡:
</div>
<div
class=
"tit"
>
答题卡:
</div>
<div
class=
"card_con"
>
<div
class=
"card_con"
>
...
@@ -83,6 +87,10 @@
...
@@ -83,6 +87,10 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"st-btn"
>
<div
class=
"btn"
@
click=
"go(0)"
>
全部解析
</div>
<div
class=
"btn"
@
click=
"go(-1)"
>
错误解析
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -334,4 +342,46 @@ export default {
...
@@ -334,4 +342,46 @@ export default {
}
}
}
}
}
}
.nl-btn
{
display
:
flex
;
margin-top
:
.3rem
;
.btn
{
width
:
3rem
;
height
:
.7rem
;
background
:linear-gradient
(
90deg
,
rgba
(
43
,
124
,
233
,
1
)
0
%
,
rgba
(
103
,
168
,
255
,
1
)
100
%
)
;
border-radius
:
.12rem
;
font-size
:
.3rem
;
color
:
#fff
;
text-align
:
center
;
line-height
:
.7rem
;
}
.btn
:nth-child
(
2
)
{
margin-left
:
auto
;
}
}
.st-btn
{
width
:
100%
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
height
:
1rem
;
background
:rgba
(
255
,
255
,
255
,
1
)
;
box-shadow
:
0px
0px
6px
0px
rgba
(
0
,
0
,
0
,
0
.05
);
z-index
:
99
;
display
:
flex
;
align-items
:
center
;
padding
:
0
.4rem
;
.btn
{
width
:
3rem
;
height
:
.7rem
;
background
:rgba
(
43
,
124
,
233
,
1
)
;
border-radius
:
.12rem
;
color
:
#fff
;
font-size
:
.3rem
;
text-align
:
center
;
line-height
:
.7rem
;
}
.btn
:nth-child
(
2
)
{
margin-left
:
auto
;
}
}
</
style
>
</
style
>
src/modules/exam-module/src/ExamTopic.vue
浏览文件 @
70718cf6
...
@@ -154,7 +154,6 @@ export default {
...
@@ -154,7 +154,6 @@ export default {
}
}
},
},
beforeDestroy
()
{
beforeDestroy
()
{
console
.
log
(
111111
)
clearInterval
(
this
.
initTime
)
clearInterval
(
this
.
initTime
)
// clearInterval(this.cache)
// clearInterval(this.cache)
},
},
...
@@ -356,7 +355,11 @@ export default {
...
@@ -356,7 +355,11 @@ export default {
const
param
=
this
.
requestParam
const
param
=
this
.
requestParam
Exam
.
getExam
(
param
,
this
.
requestParam
.
papersUrl
).
then
(
res
=>
{
Exam
.
getExam
(
param
,
this
.
requestParam
.
papersUrl
).
then
(
res
=>
{
const
times
=
res
.
sheet
.
remainingTime
?
res
.
sheet
.
remainingTime
:
res
.
sheet
.
duration
const
times
=
res
.
sheet
.
remainingTime
?
res
.
sheet
.
remainingTime
:
res
.
sheet
.
duration
this
.
questionsData
=
res
if
(
this
.
$route
.
query
.
id
===
-
1
||
this
.
$route
.
query
.
id
===
'-1'
)
{
this
.
errorQuestion
(
res
)
}
else
{
this
.
questionsData
=
res
}
this
.
remainingTime
=
this
.
secondToDate
(
times
)
this
.
remainingTime
=
this
.
secondToDate
(
times
)
this
.
setClock
(
times
)
this
.
setClock
(
times
)
if
(
res
.
sheet
.
status
===
1
||
res
.
sheet
.
status
===
2
)
{
if
(
res
.
sheet
.
status
===
1
||
res
.
sheet
.
status
===
2
)
{
...
@@ -393,6 +396,19 @@ export default {
...
@@ -393,6 +396,19 @@ export default {
}
}
})
})
},
},
errorQuestion
(
data
)
{
let
count
=
data
.
sheet
.
question_count
data
.
questions
.
map
((
item
)
=>
{
item
.
question_list
.
map
((
dItem
,
index
)
=>
{
if
(
data
.
score_items
[
item
.
id
][
dItem
.
id
].
is_right
)
{
item
.
question_list
.
splice
(
index
,
1
)
count
--
}
})
})
data
.
sheet
.
question_count
=
count
this
.
questionsData
=
data
},
getSecond
(
time
)
{
getSecond
(
time
)
{
let
s
=
''
let
s
=
''
const
hour
=
time
.
split
(
':'
)[
0
]
const
hour
=
time
.
split
(
':'
)[
0
]
...
...
src/pages/courseExam/answer.vue
浏览文件 @
70718cf6
...
@@ -21,6 +21,9 @@ export default {
...
@@ -21,6 +21,9 @@ export default {
// { vmid: 'description', name: 'description', content: this.description }
// { vmid: 'description', name: 'description', content: this.description }
]
]
}
}
},
beforeDestroy
()
{
window
.
localStorage
.
isBack
=
true
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/courseExam/index.vue
浏览文件 @
70718cf6
...
@@ -70,6 +70,16 @@ png图片,可以方便你直接应用到自己的设计作品中,我们
...
@@ -70,6 +70,16 @@ png图片,可以方便你直接应用到自己的设计作品中,我们
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"exam_submit"
v-if=
"isExamPopTo"
>
<div
class=
"pop"
>
<div
class=
"tit"
>
能力自测
</div>
<div
class=
"txt"
>
考试还未结束确定退出考试?
</div>
<div
class=
"btn_box"
>
<div
class=
"btn"
@
click=
"isExamPopTo = false"
>
看看其他
</div>
<div
class=
"btn btn2"
@
click=
"goAbilityExam(0)"
>
继续考试
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -83,6 +93,7 @@ export default {
...
@@ -83,6 +93,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
isExamPop
:
false
,
isExamPop
:
false
,
isExamPopTo
:
false
,
tabNav
:
{
tabNav
:
{
navText
:
[
'能力自测'
,
'随堂小测'
,
'知识点小测'
],
navText
:
[
'能力自测'
,
'随堂小测'
,
'知识点小测'
],
navIndex
:
0
navIndex
:
0
...
@@ -90,6 +101,11 @@ export default {
...
@@ -90,6 +101,11 @@ export default {
CourseChapter
:
[]
CourseChapter
:
[]
}
}
},
},
computed
:
{
isWeapp
()
{
return
this
.
$store
.
state
.
isWeapp
}
},
metaInfo
()
{
metaInfo
()
{
return
{
return
{
title
:
'课程测验'
,
title
:
'课程测验'
,
...
@@ -101,9 +117,29 @@ export default {
...
@@ -101,9 +117,29 @@ export default {
mounted
()
{
mounted
()
{
this
.
getCourseChapterList
()
this
.
getCourseChapterList
()
this
.
scrollDom
()
this
.
scrollDom
()
this
.
init
()
},
},
methods
:
{
methods
:
{
abilityExam
()
{
async
init
()
{
const
param
=
{
type
:
1
}
const
isLogin
=
await
this
.
$store
.
dispatch
(
'checkLogin'
)
if
(
isLogin
)
{
api
.
getExamStatus
(
param
).
then
(
res
=>
{
if
(
res
.
status
===
'0'
||
res
.
status
===
'3'
)
{
console
.
log
(
11111
)
this
.
isExamPopTo
=
true
}
})
}
},
async
abilityExam
()
{
const
isLogin
=
await
this
.
$store
.
dispatch
(
'checkLogin'
)
if
(
!
isLogin
)
{
this
.
goAbilityExam
(
1
)
return
false
}
const
param
=
{
const
param
=
{
type
:
1
type
:
1
}
}
...
@@ -154,7 +190,22 @@ export default {
...
@@ -154,7 +190,22 @@ export default {
go
()
{
go
()
{
this
.
$router
.
push
(
'/exam/answer'
)
this
.
$router
.
push
(
'/exam/answer'
)
},
},
tab
(
e
)
{
async
tab
(
e
)
{
const
isLogin
=
await
this
.
$store
.
dispatch
(
'checkLogin'
)
console
.
log
(
isLogin
)
if
(
!
isLogin
)
{
if
(
this
.
isWeapp
)
{
// 小程序
wx
.
miniProgram
.
navigateTo
({
url
:
`/pages/login/index?redirect_uri=
${
encodeURIComponent
(
`/pages/web/index?src=
${
window
.
location
.
origin
}
/course/learn`
)}
`
})
}
else
{
this
.
$router
.
push
({
name
:
'login'
})
}
return
}
this
.
tabNav
.
navIndex
=
e
this
.
tabNav
.
navIndex
=
e
this
.
scrollDom
()
this
.
scrollDom
()
},
},
...
...
src/pages/home/index.vue
浏览文件 @
70718cf6
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
<li
class=
"nav-item"
@
click=
"onClickNav('courseLearn', true)"
>
<li
class=
"nav-item"
@
click=
"onClickNav('courseLearn', true)"
>
<img
src=
"../../assets/images/home_menu_01.png"
alt=
"课程学习"
/>
<img
src=
"../../assets/images/home_menu_01.png"
alt=
"课程学习"
/>
</li>
</li>
<li
class=
"nav-item"
@
click=
"onClickNav('
courseTest
')"
>
<li
class=
"nav-item"
@
click=
"onClickNav('
examIndex
')"
>
<img
src=
"../../assets/images/home_menu_02.png"
alt=
"课程测验"
/>
<img
src=
"../../assets/images/home_menu_02.png"
alt=
"课程测验"
/>
</li>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
@
click=
"onClickNav('mockIndex', true)"
>
<img
src=
"../../assets/images/home_menu_03.png"
alt=
"模拟考试"
/>
<img
src=
"../../assets/images/home_menu_03.png"
alt=
"模拟考试"
/>
</li>
</li>
</ul>
</ul>
...
@@ -66,7 +66,7 @@ export default {
...
@@ -66,7 +66,7 @@ export default {
async
onClickNav
(
name
,
requireLogin
)
{
async
onClickNav
(
name
,
requireLogin
)
{
const
map
=
{
const
map
=
{
courseLearn
:
`/pages/web/index?src=
${
window
.
location
.
origin
}
/course/learn`
,
courseLearn
:
`/pages/web/index?src=
${
window
.
location
.
origin
}
/course/learn`
,
courseTest
:
`/pages/web/index?src=
${
window
.
location
.
origin
}
/test
`
examIndex
:
`/pages/web/index?src=
${
window
.
location
.
origin
}
/exam/index?isBack=1
`
}
}
const
isLogin
=
requireLogin
const
isLogin
=
requireLogin
?
await
this
.
$store
.
dispatch
(
'checkLogin'
)
?
await
this
.
$store
.
dispatch
(
'checkLogin'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论