Commit 34e94579 authored by limingzhe's avatar limingzhe

feat: 更多按钮消失隐藏

parent 54e934bb
......@@ -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>
......
......@@ -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 = true;
isShowMore = false;
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 }, '*');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment