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
34e94579
Commit
34e94579
authored
Aug 05, 2021
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更多按钮消失隐藏
parent
54e934bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
play.component.html
src/app/play/play.component.html
+3
-3
play.component.ts
src/app/play/play.component.ts
+24
-2
No files found.
src/app/play/play.component.html
View file @
34e94579
...
...
@@ -129,17 +129,17 @@
</div>
</div>
<!-- 按钮 -->
<div
style=
"position: absolute; top: 0; margin-top: 85vh
;"
>
<div
*
ngIf=
"isShowMoreBtnTime && isShowMore"
style=
"position: absolute; top: 0; margin-top: 85vh; overflow: hidden
;"
>
<div
style=
"z-index: 2; position: relative; "
>
<img
src=
"assets/play/big_btn.png"
style=
"height: 9.5vh; width: auto; z-index: 12;"
>
</div>
<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
*
ngIf=
"isShowMoreBtnTime && isShowMore"
(
click
)="
moreBtnClick
()"
style=
"z-index: 3; position: relative; margin-top: -19vh; margin-left: auto; margin-right: auto; height: 9.5vh; width: 114vh; "
>
<div
(
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;"
>
<div
style=
"z-index: 1; width: 100%; position:
relative; top:0; margin-top: -7
.5vh; text-align: center;"
>
<img
src=
"assets/play/big_btn_shadow.png"
style=
"width: auto; height: 11.3vh;"
/>
</div>
</div>
...
...
src/app/play/play.component.ts
View file @
34e94579
...
...
@@ -188,6 +188,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
update
();
this
.
addServerListener
();
window
[
'
air
'
].
hideAirClassLoading
(
this
.
KEY
,
this
.
data
);
...
...
@@ -267,7 +268,7 @@ export class PlayComponent implements OnInit, OnDestroy {
circleHeight
;
tweenItem
;
isShowMoreBtnTime
;
isShowMore
=
tru
e
;
isShowMore
=
fals
e
;
initData
()
{
...
...
@@ -500,7 +501,14 @@ export class PlayComponent implements OnInit, OnDestroy {
loadEnd
(
cb
)
{
this
.
playSentenceAudio
();
console
.
log
(
'
in loadEnd
'
)
try
{
this
.
playSentenceAudio
();
}
catch
(
error
)
{
console
.
log
(
error
);
}
// this.init();
// this.update();
...
...
@@ -532,6 +540,16 @@ export class PlayComponent implements OnInit, OnDestroy {
});
}
window
.
addEventListener
(
'
message
'
,
(
e
)
=>
{
let
msgData
=
e
.
data
;
if
(
msgData
.
action
===
"
is_show_more
"
)
{
const
data
=
JSON
.
parse
(
msgData
.
data
);
this
.
isShowMore
=
data
.
isShowMore
;
}
})
c
.
onEvent
(
'
course-in-screen
'
,
(
data
,
next
)
=>
{
this
.
loadEnd
(()
=>
{
...
...
@@ -540,6 +558,7 @@ export class PlayComponent implements OnInit, OnDestroy {
});
c
.
onEvent
(
'
is_show_more
'
,
(
data
)
=>
{
console
.
log
(
'
in is_show_more:
'
,
data
);
this
.
isShowMore
=
data
;
})
}
...
...
@@ -575,6 +594,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
playSentenceAudio
();
this
.
initResultView
();
// this.update();
// this.initResultView();
...
...
@@ -824,6 +845,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const
resultDataStr
=
JSON
.
stringify
(
this
.
resultSentenceArr
);
console
.
log
(
'
resultDataStr:
'
,
resultDataStr
);
window
.
parent
.
postMessage
({
action
:
'
temp_send_result
'
,
data
:
resultDataStr
},
'
*
'
);
}
...
...
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