Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM-15
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
JM-15
Commits
8503a3dc
Commit
8503a3dc
authored
Oct 09, 2021
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:加一个答题时间
parent
fda90d56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
play.component.ts
src/app/play/play.component.ts
+6
-5
No files found.
src/app/play/play.component.ts
View file @
8503a3dc
...
@@ -584,7 +584,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -584,7 +584,9 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
}
}
localStartTime
=
new
Date
().
getTime
();
gameStart
()
{
gameStart
()
{
this
.
localStartTime
=
new
Date
().
getTime
();
console
.
log
(
'
in gameStart
'
);
console
.
log
(
'
in gameStart
'
);
if
(
this
.
isTeacher
)
{
if
(
this
.
isTeacher
)
{
this
.
sendBtn
.
visible
=
false
;
this
.
sendBtn
.
visible
=
false
;
...
@@ -1823,7 +1825,6 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1823,7 +1825,6 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
checkShowSubTemplateOne
();
this
.
checkShowSubTemplateOne
();
this
.
isUpdateStop
=
true
;
this
.
isUpdateStop
=
true
;
// this.serverSendAnswer();
}
}
checkShowSubTemplateOne
()
{
checkShowSubTemplateOne
()
{
...
@@ -2127,7 +2128,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2127,7 +2128,8 @@ export class PlayComponent implements OnInit, OnDestroy {
return
;
return
;
}
}
c
.
sendAnswer
({
resultData
:
this
.
userResultData
,
resultPic
:
this
.
userResultPic
});
const
duration
=
new
Date
().
getTime
()
-
this
.
localStartTime
;
c
.
sendAnswer
({
resultData
:
this
.
userResultData
,
resultPic
:
this
.
userResultPic
,
duration
});
}
}
...
@@ -2593,10 +2595,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2593,10 +2595,9 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
this
.
serverResultObj
[
key
]
=
data
;
this
.
serverResultObj
[
key
]
=
data
;
this
.
serverResultObj
.
duration
=
new
Date
().
getTime
()
-
this
.
localStartTime
;
c
.
sendAnswer
(
this
.
serverResultObj
);
c
.
sendAnswer
(
this
.
serverResultObj
);
console
.
log
(
'
sendAnswer :
'
,
this
.
serverResultObj
);
console
.
log
(
'
sendAnswer :
'
+
JSON
.
stringify
(
this
.
serverResultObj
));
}
}
...
...
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