From f94280d756afa7598797b706b7627f187f4af97d Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Wed, 13 Jan 2021 17:18:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0timeout=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_dreamFactory.js | 2 +- jd_family.js | 6 +++++- jd_pet.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js index e599bee5..ac381bb4 100644 --- a/jd_dreamFactory.js +++ b/jd_dreamFactory.js @@ -1300,7 +1300,7 @@ async function showMsg() { function readShareCode() { console.log(`开始`) return new Promise(async resolve => { - $.get({url: `http://api.turinglabs.net/api/v1/jd/jxfactory/read/${randomCount}/`}, (err, resp, data) => { + $.get({url: `http://api.turinglabs.net/api/v1/jd/jxfactory/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) diff --git a/jd_family.js b/jd_family.js index 95f3058c..81e93d6a 100644 --- a/jd_family.js +++ b/jd_family.js @@ -73,7 +73,11 @@ if ($.isNode()) { } continue } - await jdFamily() + // await jdFamily() + while (true) { + await $.wait(31000) + await jdFamily() + } } } })() diff --git a/jd_pet.js b/jd_pet.js index da69e981..22880358 100644 --- a/jd_pet.js +++ b/jd_pet.js @@ -439,7 +439,7 @@ async function showMsg() { } function readShareCode() { return new Promise(async resolve => { - $.get({url: `http://api.turinglabs.net/api/v1/jd/pet/read/${randomCount}/`}, (err, resp, data) => { + $.get({url: `http://api.turinglabs.net/api/v1/jd/pet/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`)