Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
b23c72f4
Commit
b23c72f4
authored
May 18, 2021
by
林文清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:考试下一题
parent
4d4e9ac1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
21 deletions
+5
-21
answer.vue
src/pages/learn/answer.vue
+5
-21
No files found.
src/pages/learn/answer.vue
View file @
b23c72f4
...
...
@@ -110,6 +110,9 @@ export default {
this
.
applyExam
();
// this.getUserExamInfo();
},
onUnload
()
{
clearTimeout
(
this
.
timer
);
},
methods
:
{
formatTimeToMini
(
timestamp
)
{
let
result
=
timestamp
;
...
...
@@ -470,42 +473,23 @@ export default {
//下一题
nextClick
:
function
()
{
clearTimeout
(
this
.
timer
);
this
.
currentNumber
=
this
.
currentNumber
+
1
;
//this.getData()
this
.
handleAnswer
();
//this.getNext()
},
//所选答案
handleAnswer
:
function
()
{
/*
userAnswerIds
本题回答。
多选题时id按从小到大排序,并英文逗号,分隔;
简答题时直接存问题答案。
如果是第一次答题,不需要传。
*/
//每次清空
//每次清空,多选题时id按从小到大排序,并英文逗号,分隔;
this
.
userAnswerIds
=
""
;
this
.
currentItem
.
answerList
.
forEach
((
item
)
=>
{
if
(
item
.
isSelect
)
{
//this.userAnswerIds = item.id + ',' + this.userAnswerIds
//answerType 题目类型,1单选,2多选,3简答,
if
(
this
.
currentItem
.
question
.
answerType
==
2
)
{
//多选
///*
if
(
this
.
userAnswerIds
.
length
==
0
)
{
this
.
userAnswerIds
=
item
.
id
;
}
else
{
// if(this.userAnswerIds.length == 1)
this
.
userAnswerIds
=
this
.
userAnswerIds
+
","
+
item
.
id
;
this
.
userAnswerIds
=
this
.
userAnswerIds
+
","
+
item
.
id
;
}
//*/
}
else
{
//单选
this
.
userAnswerIds
=
item
.
id
;
...
...
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