Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM_4-1
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_4-1
Commits
15a5a5e8
Commit
15a5a5e8
authored
Aug 11, 2021
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 上报成绩
parent
22ea8686
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
5 deletions
+51
-5
play.component.ts
src/app/play/play.component.ts
+51
-5
No files found.
src/app/play/play.component.ts
View file @
15a5a5e8
...
@@ -244,6 +244,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -244,6 +244,7 @@ export class PlayComponent implements OnInit, OnDestroy {
sentenceArr
=
[];
sentenceArr
=
[];
submitCount
=
0
;
submitCount
=
0
;
safeDefaultUrl
;
safeDefaultUrl
;
resultAnswerArr
;
initData
()
{
initData
()
{
...
@@ -281,6 +282,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -281,6 +282,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
safeDefaultUrl
=
this
.
sanitizer
.
bypassSecurityTrustResourceUrl
(
''
);
this
.
safeDefaultUrl
=
this
.
sanitizer
.
bypassSecurityTrustResourceUrl
(
''
);
this
.
resultAnswerArr
=
[];
}
}
...
@@ -531,8 +534,6 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -531,8 +534,6 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
initView
();
this
.
initView
();
}
}
initCtx
()
{
initCtx
()
{
...
@@ -1383,10 +1384,12 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1383,10 +1384,12 @@ export class PlayComponent implements OnInit, OnDestroy {
moreBtnClick
()
{
moreBtnClick
()
{
this
.
setPageData
(
'
progress
'
,
'
2
'
,
false
);
//
this.setPageData('progress', '2', false);
this
.
setPageData
(
'
submitCount
'
,
this
.
submitCount
);
//
this.setPageData('submitCount', this.submitCount);
this
.
checkShowSubTemplateOne
();
this
.
checkShowSubTemplateOne
();
this
.
isUpdateStop
=
true
;
this
.
isUpdateStop
=
true
;
// this.serverSendAnswer();
}
}
checkShowSubTemplateOne
()
{
checkShowSubTemplateOne
()
{
...
@@ -1474,8 +1477,15 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1474,8 +1477,15 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
changeBtnOff
();
this
.
changeBtnOff
();
this
.
btnArr
=
[];
this
.
btnArr
=
[];
delayCall
(
0.3
,
()
=>
{
delayCall
(
0.3
,
()
=>
{
this
.
initResultView
();
this
.
initResultView
();
this
.
setPageData
(
'
progress
'
,
'
2
'
,
false
);
this
.
setPageData
(
'
submitCount
'
,
this
.
submitCount
);
this
.
serverSendAnswer
();
})
})
}
}
...
@@ -1490,6 +1500,27 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1490,6 +1500,27 @@ export class PlayComponent implements OnInit, OnDestroy {
// tweenChange(shadow, {y: shadowBaseY, alpha: 1}, time)
// tweenChange(shadow, {y: shadowBaseY, alpha: 1}, time)
})
})
this
.
addResultAnswer
();
}
addResultAnswer
()
{
console
.
log
(
'
this.data.contentObj.sentenceArr:
'
,
this
.
data
.
contentObj
.
sentenceArr
)
console
.
log
(
'
this.sentenceEmptyArr:
'
,
this
.
sentenceEmptyArr
);
const
sentenceArr
=
this
.
data
.
contentObj
.
sentenceArr
;
const
resultAnswer
=
[];
for
(
let
i
=
0
;
i
<
sentenceArr
.
length
;
i
++
)
{
const
label
=
this
.
sentenceEmptyArr
[
i
].
label
;
const
tmpData
=
{};
tmpData
[
'
question
'
]
=
sentenceArr
[
i
];
tmpData
[
'
userAnswer
'
]
=
label
.
text
;
resultAnswer
.
push
(
tmpData
);
}
this
.
resultAnswerArr
.
push
(
resultAnswer
);
}
}
...
@@ -1832,7 +1863,12 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1832,7 +1863,12 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
msgData
.
action
===
"
temp_send_result
"
)
{
if
(
msgData
.
action
===
"
temp_send_result
"
)
{
const
progress
=
this
.
getPageData
(
'
progress
'
);
if
(
progress
==
'
2
'
)
{
this
.
setPageData
(
'
progress
'
,
'
3
'
);
this
.
setPageData
(
'
progress
'
,
'
3
'
);
}
else
{
this
.
setPageData
(
'
progress
'
,
'
4
'
);
}
console
.
log
(
'
in temp_send_result __ msgData:
'
,
msgData
);
console
.
log
(
'
in temp_send_result __ msgData:
'
,
msgData
);
}
}
...
@@ -1860,6 +1896,16 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1860,6 +1896,16 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
serverSendAnswer
()
{
const
c
=
window
[
'
courseware
'
];
if
(
!
c
)
{
return
;
}
c
.
sendAnswer
(
this
.
resultAnswerArr
);
console
.
log
(
'
sendAnswer :
'
,
this
.
resultAnswerArr
);
}
...
...
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