Commit e3615e7f authored by limingzhe's avatar limingzhe

fix: debug

parent d1cbf2c1
...@@ -429,6 +429,9 @@ cc.Class({ ...@@ -429,6 +429,9 @@ cc.Class({
cc.tween({}) cc.tween({})
.delay(1) .delay(1)
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
if (window && window.courseware && this.isTeacher) { if (window && window.courseware && this.isTeacher) {
window.courseware.nextPage(); window.courseware.nextPage();
} }
...@@ -682,6 +685,9 @@ cc.Class({ ...@@ -682,6 +685,9 @@ cc.Class({
cc.tween(this.bgLayer) cc.tween(this.bgLayer)
.to(1, {x: -this.curPageIndex * this.canvasWidth}, {easing: "cubicOut"}) .to(1, {x: -this.curPageIndex * this.canvasWidth}, {easing: "cubicOut"})
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
this.canTouch = true; this.canTouch = true;
this.refreshPageLabel(); this.refreshPageLabel();
}) })
...@@ -705,20 +711,13 @@ cc.Class({ ...@@ -705,20 +711,13 @@ cc.Class({
} }
playAudioByUrl(audioUrl); playAudioByUrl(audioUrl);
},
onDestroy() {
this.isDestroy = true;
}
// if (!this.curAudio) {
// this.curAudio = audio;
// this.curAudio.addEventListener('ended', () => {
// console.log('ended');
// this.onPageAudioOver();
// this.curAudio = null;
// });
// }
// audio.play();
// this.audioBtn.init(this.images.get('btn_stop'));
},
// pausePageAudio() { // pausePageAudio() {
// this.curAudio.pause(); // this.curAudio.pause();
// this.audioBtn.init(this.images.get('btn_play')); // this.audioBtn.init(this.images.get('btn_play'));
......
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