From 888e8b1c486b728112f4835393a9669232a685f1 Mon Sep 17 00:00:00 2001 From: axetroy Date: Sun, 29 Oct 2017 21:33:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E4=BA=BA=E4=BA=BA?= =?UTF-8?q?=E8=BD=A6provider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\344\272\272\344\272\272\350\275\246.js" | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 "app/providers/\344\272\272\344\272\272\350\275\246.js" diff --git "a/app/providers/\344\272\272\344\272\272\350\275\246.js" "b/app/providers/\344\272\272\344\272\272\350\275\246.js" new file mode 100644 index 0000000..b1724a6 --- /dev/null +++ "b/app/providers/\344\272\272\344\272\272\350\275\246.js" @@ -0,0 +1,23 @@ +const Provider = require('../provider'); +const utils = require('../utils'); + +module.exports = class extends Provider { + constructor() { + super(); + this.url = `https://www.renrenche.com/`; + } + async resolve(ctx) { + const options = ctx.options; + const page = ctx.page; + + await page.click('.js-login.login .log-status'); + + await page.type('input[name="phone"]', options.phone, { delay: 100 }); + + await utils.sleep(1000); + + await page.click('.verify-btn'); + + // 检验是否发送成功 + } +};