Commit e2bb69df authored by chenzihui's avatar chenzihui

修改

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