Compare commits

...

2 Commits

Author SHA1 Message Date
KingRan 70d91879f1 更新 2022-03-10 21:14:42 +08:00
KingRan cae954df9c 更新 2022-03-10 21:11:43 +08:00
2 changed files with 24 additions and 5 deletions

View File

@ -43,7 +43,7 @@ let randomCount = $.isNode() ? 20 : 5;
let num;
$.newShareCode = [];
let NowHour = new Date().getHours();
let lnrun = 0;
!(async () => {
await requireConfig();
if (!cookiesArr[0]) {
@ -70,8 +70,14 @@ let NowHour = new Date().getHours();
message = '';
subTitle = '';
option = {};
lnrun++;
await jdPlantBean();
await showMsg();
if(lnrun == 3){
console.log(`\n【访问接口次数达到3次休息一分钟.....】\n`);
await $.wait(60*1000);
lnrun = 0;
}
//await showMsg();
}
}
if ($.isNode() && allMessage) {

View File

@ -42,7 +42,8 @@ let awardState = '';//上期活动的京豆是否收取
let randomCount = $.isNode() ? 20 : 5;
let num;
$.newShareCode = [];
let lnrun = 0;
let lnruns = 0;
!(async () => {
await requireConfig();
if (!cookiesArr[0]) {
@ -71,9 +72,15 @@ $.newShareCode = [];
subTitle = '';
option = {};
await jdPlantBean();
await $.wait(5 * 1000);
await $.wait(2 * 1000);
lnrun++;
await doHelp();
await $.wait(5 * 1000);
if (lnrun == 3) {
console.log(`\n【访问接口次数达到3次休息半分钟.....】\n`);
await $.wait(30 * 1000);
lnrun = 0;
}
await $.wait(3 * 1000);
}
}
if ($.isNode() && allMessage) {
@ -134,7 +141,13 @@ async function doHelp() {
console.log(`\n跳过自己的plantUuid\n`)
continue
}
lnruns++;
await helpShare(plantUuid);
if (lnruns == 5) {
console.log(`\n【访问接口次数达到5次休息半分钟.....】\n`);
await $.wait(30 * 1000);
lnruns = 0;
}
if ($.helpResult && $.helpResult.code === '0') {
console.log(`助力好友结果: ${JSON.stringify($.helpResult.data.helpShareRes)}`);
if ($.helpResult.data.helpShareRes) {