Commit fc59198b authored by liujiangnan's avatar liujiangnan

test: 检测放过

parent 862e8ffb
...@@ -37,6 +37,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -37,6 +37,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async startStep1() { async startStep1() {
await this.asyncPlayAudioByUrl(this.data.pageArr[this.currentPageIdx].startAudio); await this.asyncPlayAudioByUrl(this.data.pageArr[this.currentPageIdx].startAudio);
let testCount = 0;
const circulate = async () => { const circulate = async () => {
await asyncDelay(0.3); await asyncDelay(0.3);
const circle = cc.find('Canvas/step1/pad/circle'); const circle = cc.find('Canvas/step1/pad/circle');
...@@ -54,7 +55,12 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -54,7 +55,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showTips(`未检测到对应页面`); this.showTips(`未检测到对应页面`);
bar.progress = 1; bar.progress = 1;
circle.active = false; circle.active = false;
await circulate(); testCount ++;
if (testCount < 10) {
await circulate();
} else {
this.showTips(`检测超时`);
}
} }
} }
await circulate(); await circulate();
......
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