Skip to content

Commit

Permalink
fix: 巨人网络provider没有正确检测是否发送短信成功
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Dec 3, 2017
1 parent 3361967 commit 300b884
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/providers/巨人网络.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ module.exports = class extends Provider {
const options = ctx.options;
const page = ctx.page;

await page.type('#reg_form input[name=phone]', options.phone, { delay: 100 });
await page.type('#reg_form input[name=phone]', options.phone, { delay: 50 });

await page.click('#reg_form input.get-mpcode');

// // 检验是否发送成功
// await page.waitForSelector('#reg_form input.get-mpcode[disabled]', {
// timeout: 1000 * 3,
// });
// 检验是否发生成功
try {
await page.waitForSelector('.get-mpcode[disabled]', { timeout: 1000 * 3 });
} catch (err) {
throw null;
}
}
};

0 comments on commit 300b884

Please sign in to comment.