-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const Provider = require('../provider'); | ||
const utils = require('../utils'); | ||
|
||
module.exports = class extends Provider { | ||
constructor() { | ||
super(); | ||
this.url = `http://passport.zcool.com.cn/regPhone.do?appId=1006`; | ||
this.alone = true; | ||
} | ||
async resolve(ctx) { | ||
const options = ctx.options; | ||
const page = ctx.page; | ||
|
||
await page.type('#mobilephone', options.phone, { delay: 50 }); | ||
|
||
// 按下鼠标,拖动滚动条 | ||
await page.mouse.move(530, 290, { steps: 40 }); | ||
await page.mouse.down(); | ||
await page.mouse.move(622, 299, { steps: 30 }); | ||
await page.mouse.move(736, 285, { steps: 20 }); | ||
await page.mouse.move(850, 290, { steps: 10 }); | ||
await page.mouse.up(); | ||
// 松开鼠标 | ||
|
||
await utils.sleep(1000); | ||
await page.click('#veribtn'); | ||
|
||
// await page.waitForSelector('button.next-btn[disabled]', { timeout: 1000 * 3 }); | ||
} | ||
}; |