Commit e2bb69df authored by chenzihui's avatar chenzihui

修改

parent 64b520cc
...@@ -516,14 +516,23 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -516,14 +516,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.moveOutOkBtn(); this.moveOutOkBtn();
this.showWhiteNode(); this.showWhiteNode();
let timeout = false
if ((<any>window).courseware && (<any>window).courseware.stopTest) { if ((<any>window).courseware && (<any>window).courseware.stopTest) {
this.scheduleOnce(()=>{
timeout = true;
this.reviewFail();
},3);
(<any>window).courseware.stopTest((res) => { (<any>window).courseware.stopTest((res) => {
if(!timeout)
{
this.unscheduleAllCallbacks();
res = JSON.parse(res) res = JSON.parse(res)
if (res.result && res.result.overall >= 80) { if (res.result && res.result.overall >= 80) {
this.reviewSuccess(); this.reviewSuccess();
} else { } else {
this.reviewFail(); this.reviewFail();
} }
}
}) })
} else { } else {
this.reviewFail(); this.reviewFail();
......
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