Commit 61ef169b authored by liujiangnan's avatar liujiangnan

feat:

parent 5524a861
...@@ -82,6 +82,7 @@ cc.Class({ ...@@ -82,6 +82,7 @@ cc.Class({
}, },
start() { start() {
this.turnPageWait = 0;
this.node.zIndex = 9999; this.node.zIndex = 9999;
cc.game.addPersistRootNode(this.node); cc.game.addPersistRootNode(this.node);
this.initListener(); this.initListener();
...@@ -674,6 +675,7 @@ cc.Class({ ...@@ -674,6 +675,7 @@ cc.Class({
.start(); .start();
}, },
turnPageWait,
reWriteAir() { reWriteAir() {
window.courseware.getData = (callback) => { window.courseware.getData = (callback) => {
let data = null; let data = null;
...@@ -684,13 +686,17 @@ cc.Class({ ...@@ -684,13 +686,17 @@ cc.Class({
callback && callback(data); callback && callback(data);
} }
window.courseware.nextPage = () => { window.courseware.nextPage = () => {
this.goNextPage(); setTimeout(() => {
this.goNextPage();
}, this.turnPageWait);
this.turnPageWait = 0;
} }
window.courseware.beforePage = () => { window.courseware.beforePage = () => {
this.goPrePage(); this.goPrePage();
} }
window.courseware.sendAnswer = (answerObj) => { window.courseware.sendAnswer = (answerObj) => {
this.log("===成功调用sendAnswer===" + JSON.stringify(answerObj)); this.log("===成功调用sendAnswer===" + JSON.stringify(answerObj));
this.turnPageWait = 2000;
this.addStar(3, true); // 上报成绩则获得三颗星星并展示动画 this.addStar(3, true); // 上报成绩则获得三颗星星并展示动画
this.callNetworkApiPost(this.baseApiUrl, `v1/terminal/save/answer`, { this.callNetworkApiPost(this.baseApiUrl, `v1/terminal/save/answer`, {
syllabus_id: this.courseItem.course_id, syllabus_id: this.courseItem.course_id,
......
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