Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM_4-2
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-2
Commits
24caef41
Commit
24caef41
authored
Aug 02, 2021
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加发送结果 监听更多练习事件
parent
47dcdb23
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
play.component.html
src/app/play/play.component.html
+1
-1
play.component.ts
src/app/play/play.component.ts
+26
-5
No files found.
src/app/play/play.component.html
View file @
24caef41
...
...
@@ -136,7 +136,7 @@
<div
style=
"z-index: 2; position: relative; height: 9.5vh; top: -9.5vh; display: flex; align-items: center; justify-content: center;"
>
<label
style=
"margin-left: -0.5vw; font-family: Aileron-Black; font-size: 3.8vh; color:#ffffff"
>
{{'更多练习'}}
</label>
</div>
<div
(
click
)="
moreBtnClick
()"
style=
"z-index: 3; position: relative; margin-top: -19vh; margin-left: auto; margin-right: auto; height: 9.5vh; width: 114vh; "
>
<div
*
ngIf=
"isShowMoreBtn && isAnyMore"
(
click
)="
moreBtnClick
()"
style=
"z-index: 3; position: relative; margin-top: -19vh; margin-left: auto; margin-right: auto; height: 9.5vh; width: 114vh; "
>
</div>
<!-- 按钮阴影 -->
<div
style=
"z-index: 1; width: 100%; position: absolute; top:0; margin-top: 2.5vh; text-align: center;"
>
...
...
src/app/play/play.component.ts
View file @
24caef41
...
...
@@ -267,6 +267,10 @@ export class PlayComponent implements OnInit, OnDestroy {
circleHeightBig
=
20
;
circleHeight
;
tweenItem
;
isShowMoreBtn
;
isAnyMore
=
true
;
initData
()
{
...
...
@@ -305,6 +309,8 @@ export class PlayComponent implements OnInit, OnDestroy {
// this.isShowResult = true;
this
.
isCountDownStart
=
false
;
this
.
isShowMoreBtn
=
true
;
this
.
answerArr
=
[];
this
.
resultSentenceArr
=
[];
...
...
@@ -530,6 +536,10 @@ export class PlayComponent implements OnInit, OnDestroy {
next
();
});
});
c
.
onEvent
(
'
is_any_more
'
,
(
data
)
=>
{
this
.
isAnyMore
=
data
;
})
}
...
...
@@ -762,6 +772,7 @@ export class PlayComponent implements OnInit, OnDestroy {
moreBtnClick
()
{
console
.
log
(
'
in moreBtnClick
'
);
this
.
playHtmlAudio
(
"
assets/play/music/more.mp3
"
)
this
.
sendResult
();
}
inputTouch
()
{
...
...
@@ -770,6 +781,16 @@ export class PlayComponent implements OnInit, OnDestroy {
}
sendResult
()
{
this
.
isShowMoreBtn
=
false
;
const
resultDataStr
=
JSON
.
stringify
(
this
.
resultSentenceArr
);
console
.
log
(
'
resultDataStr:
'
,
resultDataStr
);
window
.
parent
.
postMessage
({
action
:
'
temp_send_result
'
,
data
:
resultDataStr
},
'
*
'
);
}
...
...
@@ -879,7 +900,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
setRectRight
(
data
);
}
else
{
const
resultData
=
this
.
getResultData
();
this
.
sendResult
(
resultData
);
//
this.sendResult(resultData);
this
.
setPageData
(
'
resultData
'
,
resultData
);
}
...
...
@@ -1759,9 +1780,9 @@ export class PlayComponent implements OnInit, OnDestroy {
}
sendResult
(
data
)
{
sendResult_
()
{
// const sendResult = (<any>window).courseware.sendResult;
...
...
@@ -2020,8 +2041,8 @@ export class PlayComponent implements OnInit, OnDestroy {
// }, 300);
}
if
(
msgData
.
action
===
"
sendR
esult
"
)
{
if
(
msgData
.
action
===
"
temp_send_r
esult
"
)
{
}
...
...
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