Commit 9eb13bc0 authored by 范雪寒's avatar 范雪寒

fix: addServerListener

parent 572ae4f2
...@@ -117,7 +117,7 @@ cc.Class({ ...@@ -117,7 +117,7 @@ cc.Class({
addPreloadImage() { addPreloadImage() {
const arr = this.data.options; const arr = this.data.options;
if (arr) { if (arr) {
for (let i=0; i<arr.length; i++) { for (let i = 0; i < arr.length; i++) {
this._imageResList.push({ url: arr[i].image }); this._imageResList.push({ url: arr[i].image });
} }
} }
...@@ -134,16 +134,12 @@ cc.Class({ ...@@ -134,16 +134,12 @@ cc.Class({
addServerListener() { addServerListener() {
const c = window.courseware; window.air.onCourseInScreen = (next) => {
if (!c) {
return;
}
c.onEvent('course-in-screen', (data, next) => {
cc.find('Canvas').opacity = 255; cc.find('Canvas').opacity = 255;
this.showTemplateStartAnima(); this.showTemplateStartAnima();
this.loadEnd(); this.loadEnd();
next(); next();
}); }
}, },
showTemplateStartAnima() { showTemplateStartAnima() {
...@@ -299,12 +295,12 @@ cc.Class({ ...@@ -299,12 +295,12 @@ cc.Class({
if (!window.courseware) { if (!window.courseware) {
return; return;
} }
window.courseware.onEvent('clickOption', (data, next) => { window.courseware.onEvent('clickOption', async (data, next) => {
this.showOption(data.data.idx); await this.showOption(data.data.idx);
next(); next();
}); });
window.courseware.onEvent('clickQuestion', (data, next) => { window.courseware.onEvent('clickQuestion', async (data, next) => {
this.showQuestion(); await this.showQuestion();
next(); next();
}); });
window.courseware.onEvent('hideOption', (data, next) => { window.courseware.onEvent('hideOption', (data, next) => {
......
{"ios":{"sceneName":"AK09","version":"fcbf3"},"android":{"sceneName":"AK09","version":"fcbf3"}} {"ios":{"sceneName":"AK09","version":"2a5a4"},"android":{"sceneName":"AK09","version":"2a5a4"}}
\ No newline at end of file \ No newline at end of file
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