Commit 6bcdddef authored by liujiangnan's avatar liujiangnan

debug

parent 8fba885b
......@@ -40,15 +40,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
const progress = cc.find('Canvas/step1/pad/circle/progress');
try {
await Promise.all([
this.asyncCountDown(progress, 10),
this.asyncCountDown(progress, 3),
this.checkPage()
]);
this.step = 1;
} catch (error) {
// TODO 十秒内没有检测到对应页码的后续处理; 先加个提示框然后重新检测
// TODO 三秒内没有检测到对应页码的后续处理; 先加个提示框然后重新检测
this.schedule(() => {
this.showTips("未检测到对应页面");
progress.getComponent(cc.ProgressBar).progress = 1;
circle.active = false;
});
await this.startStep1();
}
}
......@@ -79,7 +81,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
// 定时三秒检测
const timeout = new Promise((resolve, reject) => {
setTimeout(() => reject(new Error('checkpage timeout')), 10000)
this.schedule(() => reject(new Error('checkpage timeout')), 3000)
});
const pageId = this.data.pageArr[this.currentPageIdx].pageIdx;
......
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