From 4e6c7360b52097a5e5cf5455ed5a36402a8887a7 Mon Sep 17 00:00:00 2001 From: axetroy Date: Sun, 3 Dec 2017 20:53:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=AD=E7=91=9E?= =?UTF-8?q?=E8=B4=A2=E5=AF=8C=E9=AA=8C=E8=AF=81=E6=98=AF=E5=90=A6=E5=8F=91?= =?UTF-8?q?=E9=80=81=E6=88=90=E5=8A=9F=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\270\255\347\221\236\350\264\242\345\257\214.js" | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git "a/app/providers/\344\270\255\347\221\236\350\264\242\345\257\214.js" "b/app/providers/\344\270\255\347\221\236\350\264\242\345\257\214.js" index ffc955c..dd8562d 100644 --- "a/app/providers/\344\270\255\347\221\236\350\264\242\345\257\214.js" +++ "b/app/providers/\344\270\255\347\221\236\350\264\242\345\257\214.js" @@ -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; + } } };