Skip to content

Commit

Permalink
feat: 增加喜地provider
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Nov 26, 2017
1 parent 9885d72 commit dfe0331
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions app/providers/喜地.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const Provider = require('../provider');
const utils = require('../utils');

module.exports = class extends Provider {
constructor() {
super();
this.url = `https://passport.xidibuy.com/reg/index`;
}
async resolve(ctx) {
const options = ctx.options;
const page = ctx.page;

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

await page.click('.getTelCode');

// 检验是否发送成功
await page.waitForSelector('.getTelCode.notActive', { timeout: 1000 * 3 });
}
};

0 comments on commit dfe0331

Please sign in to comment.