Commit e3615e7f authored by limingzhe's avatar limingzhe

fix: debug

parent d1cbf2c1
......@@ -429,6 +429,9 @@ cc.Class({
cc.tween({})
.delay(1)
.call(() => {
if (this.isDestroy) {
return;
}
if (window && window.courseware && this.isTeacher) {
window.courseware.nextPage();
}
......@@ -682,6 +685,9 @@ cc.Class({
cc.tween(this.bgLayer)
.to(1, {x: -this.curPageIndex * this.canvasWidth}, {easing: "cubicOut"})
.call(() => {
if (this.isDestroy) {
return;
}
this.canTouch = true;
this.refreshPageLabel();
})
......@@ -700,25 +706,18 @@ cc.Class({
curAudio: null,
playPageAudio() {
const audioUrl = this.picArr[this.curPageIndex].audio_url;
if (!audioUrl) {
return;
}
if (!audioUrl) {
return;
}
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() {
// this.curAudio.pause();
// 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