Skip to content

Commit

Permalink
fix: 修复中瑞财富验证是否发送成功不正确的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Dec 3, 2017
1 parent 7e36751 commit 4e6c736
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/providers/中瑞财富.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ module.exports = class extends Provider {
const options = ctx.options;
const page = ctx.page;

await page.type('input.accname_input', options.phone, {delay: 100});
await page.type('input.accname_input', options.phone, { delay: 100 });

await page.type('input[name=password]', options.password, {delay: 50});
await page.type('input[name=password1]', options.password, {delay: 50});
await page.type('input[name=password]', options.password, { delay: 50 });
await page.type('input[name=password1]', options.password, { delay: 50 });

await page.click('input#sendsms-for-regiter');

// TODO: 可能会有验证码

await page.waitForSelector('input#sendsms-for-regiter[disabled]', {timeout: 1000 * 3});
try {
await page.waitForSelector('input#sendsms-for-regiter[disabled]', { timeout: 1000 * 3 });
} catch (err) {
throw null;
}
}
};

0 comments on commit 4e6c736

Please sign in to comment.