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();
}) })
...@@ -700,25 +706,18 @@ cc.Class({ ...@@ -700,25 +706,18 @@ cc.Class({
curAudio: null, curAudio: null,
playPageAudio() { playPageAudio() {
const audioUrl = this.picArr[this.curPageIndex].audio_url; const audioUrl = this.picArr[this.curPageIndex].audio_url;
if (!audioUrl) { if (!audioUrl) {
return; return;
} }
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