Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Damon
study
Commits
da563577
Commit
da563577
authored
Jul 29, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 【ID1001404】【小程序-首页-答题模式】:全部试题回答完后,toast提示太快且答题数量没有归0
parent
3f1b73f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
answer.vue
src/pages/learn/answer.vue
+13
-4
No files found.
src/pages/learn/answer.vue
View file @
da563577
...
@@ -174,7 +174,7 @@ export default {
...
@@ -174,7 +174,7 @@ export default {
current
:
0
,
current
:
0
,
// 仅仅记录swiper的位置
// 仅仅记录swiper的位置
currentIndex
:
0
,
currentIndex
:
0
,
swiperDuration
:
'
8
00'
,
swiperDuration
:
'
5
00'
,
// 分页数据
// 分页数据
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
100
,
pageSize
:
100
,
...
@@ -187,6 +187,8 @@ export default {
...
@@ -187,6 +187,8 @@ export default {
passPoint
:
60
,
passPoint
:
60
,
// 考试题数
// 考试题数
totalPoint
:
100
,
totalPoint
:
100
,
// 已做题数
count
:
0
}
}
},
},
computed
:
{
computed
:
{
...
@@ -351,6 +353,11 @@ export default {
...
@@ -351,6 +353,11 @@ export default {
return
return
}
}
}
}
if
(
this
.
source
===
1
&&
this
.
count
===
this
.
total
)
{
this
.
$u
.
vuex
(
`questionList.
${
this
.
questionWarehouseId
}
`
,
[])
}
this
.
$u
.
route
({
this
.
$u
.
route
({
type
:
'back'
,
type
:
'back'
,
})
})
...
@@ -473,7 +480,7 @@ export default {
...
@@ -473,7 +480,7 @@ export default {
this
.
$u
.
vuex
(
`lastIndex.
${
this
.
questionWarehouseId
}
`
,
this
.
currentIndex
)
this
.
$u
.
vuex
(
`lastIndex.
${
this
.
questionWarehouseId
}
`
,
this
.
currentIndex
)
// 统计是否达满所有试题
// 统计是否达满所有试题
const
count
=
this
.
questionList
[
this
.
questionWarehouseId
].
reduce
(
this
.
count
=
this
.
questionList
[
this
.
questionWarehouseId
].
reduce
(
(
accumulator
,
currentValue
)
=>
{
(
accumulator
,
currentValue
)
=>
{
if
(
currentValue
.
submitStatus
)
accumulator
++
if
(
currentValue
.
submitStatus
)
accumulator
++
return
accumulator
return
accumulator
...
@@ -481,8 +488,10 @@ export default {
...
@@ -481,8 +488,10 @@ export default {
0
0
)
)
if
(
count
===
this
.
total
)
{
if
(
this
.
count
===
this
.
total
)
{
this
.
$nextTick
(()
=>
{
return
this
.
$u
.
toast
(
'您已经答完全部试题'
)
return
this
.
$u
.
toast
(
'您已经答完全部试题'
)
})
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment