1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2026-05-01 18:06:41 +08:00
This commit is contained in:
dylan
2023-07-27 17:20:10 +08:00
parent 97038a2422
commit e68c7d5606
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -4,7 +4,7 @@
updatetime:2023/6/14 updatetime:2023/6/14
dlan dlan
变量 变量
epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口等待60秒(60000 epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口等待10秒(1000
*/ */
const $ = new Env('东东农场-助力'); const $ = new Env('东东农场-助力');
let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = ''; let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = '';
@@ -22,7 +22,7 @@ let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活
let randomCount = $.isNode() ? 20 : 5; let randomCount = $.isNode() ? 20 : 5;
const fs = require('fs'); const fs = require('fs');
const JD_API_HOST = 'https://api.m.jd.com/client.action'; 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`; 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; $.reqnum = 1;
!(async () => { !(async () => {
@@ -1226,7 +1226,7 @@ function TotalBean() {
}); });
} }
function request(function_id, body = {}, timeout = 1000) { 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++; $.reqnum++;
return new Promise(resolve => { return new Promise(resolve => {
setTimeout(() => { setTimeout(() => {
+3 -3
View File
@@ -19,7 +19,7 @@ jd免费水果 搬的https://github.com/liuxiaoyucc/jd-helper/blob/a6f275d978574
变量: 变量:
export DO_TEN_WATER_AGAIN='true' 攒水滴只交10次水,默认不攒水滴 export DO_TEN_WATER_AGAIN='true' 攒水滴只交10次水,默认不攒水滴
export FRUIT_FAST_CARD='true' 使用快速浇水卡,水多可开启 export FRUIT_FAST_CARD='true' 使用快速浇水卡,水多可开启
epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口等待60秒(60000 epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口等待10秒(10000
*/ */
const $ = new Env('东东农场-任务'); const $ = new Env('东东农场-任务');
let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = ''; let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = '';
@@ -33,7 +33,7 @@ let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活
let randomCount = $.isNode() ? 20 : 5; let randomCount = $.isNode() ? 20 : 5;
const JD_API_HOST = 'https://api.m.jd.com/client.action'; 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 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 ua = require('./USER_AGENTS');
const fs = require('fs'); const fs = require('fs');
let cachecode = []; let cachecode = [];
@@ -1478,7 +1478,7 @@ function TotalBean() {
function request(function_id, body = {}, timeout = 1000) { 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++; $.reqnum++;
return new Promise(resolve => { return new Promise(resolve => {
setTimeout(() => { setTimeout(() => {