diff --git a/jd_farm_help.js b/jd_farm_help.js index 960b56a..c343c03 100644 --- a/jd_farm_help.js +++ b/jd_farm_help.js @@ -4,7 +4,7 @@ updatetime:2023/6/14 dlan 变量 -epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口等待60秒(60000) +epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口等待10秒(1000) */ const $ = new Env('东东农场-助力'); let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = ''; @@ -22,7 +22,7 @@ let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活 let randomCount = $.isNode() ? 20 : 5; const fs = require('fs'); const JD_API_HOST = 'https://api.m.jd.com/client.action'; -const delay = process.env.FRUIT_DELAY || 60000; +const delay = process.env.FRUIT_DELAY || 10000; const urlSchema = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html%22%20%7D`; $.reqnum = 1; !(async () => { @@ -1226,7 +1226,7 @@ function TotalBean() { }); } function request(function_id, body = {}, timeout = 1000) { - if (process.env.FRUIT_DELAY && $.reqnum % 5 == 0) { console.log(`\n等待${delay / 1000}秒......\n`); timeout = delay }; + if ( $.reqnum % 5 == 0) { console.log(`\n等待${delay / 1000}秒......\n`); timeout = delay }; $.reqnum++; return new Promise(resolve => { setTimeout(() => { diff --git a/jd_fruit.js b/jd_fruit.js index f92bdf0..ee3b99d 100644 --- a/jd_fruit.js +++ b/jd_fruit.js @@ -19,7 +19,7 @@ jd免费水果 搬的https://github.com/liuxiaoyucc/jd-helper/blob/a6f275d978574 变量: export DO_TEN_WATER_AGAIN='true' 攒水滴只交10次水,默认不攒水滴 export FRUIT_FAST_CARD='true' 使用快速浇水卡,水多可开启 -epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口等待60秒(60000) +epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口等待10秒(10000) */ const $ = new Env('东东农场-任务'); let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = ''; @@ -33,7 +33,7 @@ let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活 let randomCount = $.isNode() ? 20 : 5; const JD_API_HOST = 'https://api.m.jd.com/client.action'; const urlSchema = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html%22%20%7D`; -const delay = process.env.FRUIT_DELAY || 60000; +const delay = process.env.FRUIT_DELAY || 10000; const ua = require('./USER_AGENTS'); const fs = require('fs'); let cachecode = []; @@ -1478,7 +1478,7 @@ function TotalBean() { function request(function_id, body = {}, timeout = 1000) { - if (process.env.FRUIT_DELAY && $.reqnum % 5 == 0) { console.log(`\n等待${delay / 1000}秒......\n`); timeout = delay }; + if ($.reqnum % 5 == 0) { console.log(`\n等待${delay / 1000}秒......\n`); timeout = delay }; $.reqnum++; return new Promise(resolve => { setTimeout(() => {