Commit 8fba885b authored by liujiangnan's avatar liujiangnan

feat: 十秒检测

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