Skip to content

Commit

Permalink
feat: add 微盟 provider
Browse files Browse the repository at this point in the history
  • Loading branch information
WindomZ committed Dec 2, 2017
1 parent f6b08a2 commit ccf0aee
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/providers/巨人网络.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ module.exports = class extends Provider {

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

// // 检验是否发送成功
// await page.waitForSelector('#reg_form input.get-mpcode[disabled]', {
// timeout: 1000 * 3,
// });
// // 检验是否发送成功
// await page.waitForSelector('#reg_form input.get-mpcode[disabled]', {
// timeout: 1000 * 3,
// });
}
};
25 changes: 25 additions & 0 deletions app/providers/微盟.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

const Provider = require('../provider');
const utils = require('../utils');

module.exports = class extends Provider {
constructor() {
super();
this.url = `https://account.weimob.com/register`;
}

async resolve(ctx) {
const options = ctx.options;
const page = ctx.page;

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

await page.click('a.getcode');

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

0 comments on commit ccf0aee

Please sign in to comment.