From b56be26b66901fdf98f6b6c82d971be520639678 Mon Sep 17 00:00:00 2001 From: WindomZ Date: Sat, 2 Dec 2017 23:28:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20=E8=BF=AA=E5=8D=A1=E4=BE=AC=20pro?= =?UTF-8?q?vider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\350\277\252\345\215\241\344\276\254.js" | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 "app/providers/\350\277\252\345\215\241\344\276\254.js" diff --git "a/app/providers/\350\277\252\345\215\241\344\276\254.js" "b/app/providers/\350\277\252\345\215\241\344\276\254.js" new file mode 100644 index 0000000..6019d3b --- /dev/null +++ "b/app/providers/\350\277\252\345\215\241\344\276\254.js" @@ -0,0 +1,22 @@ +'use strict'; + +const Provider = require('../provider'); +const utils = require('../utils'); + +module.exports = class extends Provider { + constructor() { + super(); + this.url = `https://www.decathlon.com.cn/zh/create`; + } + + async resolve(ctx) { + const options = ctx.options; + const page = ctx.page; + + await page.type('input#mobile', options.phone, { delay: 500 }); + + await page.click('button.cta.right'); + + // await page.waitForSelector('button.cta right', { timeout: 1000 * 3 }); + } +};