This commit is contained in:
Faker 2022-06-09 10:34:08 +08:00
parent 888ccc0451
commit 15251cb400
7 changed files with 1100 additions and 883 deletions

View File

@ -738,7 +738,7 @@ async function showMsg() {
ReturnMessage += `【京东秒杀】${$.JdMsScore}币(≈${($.JdMsScore / 1000).toFixed(2)}元)\n`; ReturnMessage += `【京东秒杀】${$.JdMsScore}币(≈${($.JdMsScore / 1000).toFixed(2)}元)\n`;
} }
if($.ECardinfo) if($.ECardinfo)
ReturnMessage += `京东E卡${$.ECardinfo}\n`; ReturnMessage += `礼卡余额${$.ECardinfo}\n`;
if ($.joylevel || $.jdCash || $.JoyRunningAmount) { if ($.joylevel || $.jdCash || $.JoyRunningAmount) {
ReturnMessage += `【其他信息】`; ReturnMessage += `【其他信息】`;

View File

@ -3,14 +3,14 @@
============Quantumultx=============== ============Quantumultx===============
[task_local] [task_local]
#店铺签到 #店铺签到
15 2,14 * * * https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js, tag=店铺签到, enabled=true 15 2,14 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js, tag=店铺签到, enabled=true
===========Loon============ ===========Loon============
[Script] [Script]
cron "15 2,14 * * *" script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js,tag=店铺签到 cron "15 2,14 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js,tag=店铺签到
============Surge============= ============Surge=============
店铺签到 = type=cron,cronexp="15 2,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js 店铺签到 = type=cron,cronexp="15 2,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js
===========小火箭======== ===========小火箭========
店铺签到 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.jss, cronexpr="15 2,14 * * *", timeout=3600, enable=true 店铺签到 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.jss, cronexpr="15 2,14 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('店铺签到'); const $ = new Env('店铺签到');
const notify = $.isNode() ? require('./sendNotify') : ''; const notify = $.isNode() ? require('./sendNotify') : '';
@ -25,7 +25,7 @@ let vender=''
let num=0 let num=0
let shopname='' let shopname=''
const token = [ const token = [
"35BA76ED53A953E03F77EE5379C28BE5", "FD7F0E88F2555A9A7254AA00D6DDA1F6",
"4BE1B58FE1360409A5967CAD1127B5A8", "4BE1B58FE1360409A5967CAD1127B5A8",
"60454759577C6664C8AAAFEEBE25B7A1", "60454759577C6664C8AAAFEEBE25B7A1",
"3B27B2B9E70249C339D66F27B7E133F0", "3B27B2B9E70249C339D66F27B7E133F0",
@ -38,15 +38,12 @@ const token = [
"5CF1A3455369BDB3D1153D9FC974CAFA", "5CF1A3455369BDB3D1153D9FC974CAFA",
"E29627AF30D59CF7FE7B01C63BD9A975", "E29627AF30D59CF7FE7B01C63BD9A975",
"5B43A702C5CC14509CD8FB6F725326FC", "5B43A702C5CC14509CD8FB6F725326FC",
"451389BCDC4E8B258DD3F21CDB827589", "22E454E7DA34CBA96DFAB150C2882193",
"57970BD464D679B43A7A0F5585F42677", "EBC1F95B42459D9F27E2025E11E1F7C6",
"8029DFB0D9ADF5C6E96AF7D542B3E715", "05FE7C8117A8CF6FA8BAD56C6E776CD7",
"7C54AE28BAEDCBB8C927768AE71CA0EF", "7C54AE28BAEDCBB8C927768AE71CA0EF",
"3B864BF96848A44E170A26D2791E0AE3", "3B864BF96848A44E170A26D2791E0AE3",
"4706B9DB78BBCC66BCB76862EB147AD2",
"F96D0FC8CC217B855988CA26E2A8BE74",
"809569E3816B2C76210BFF8DB3F2766E", "809569E3816B2C76210BFF8DB3F2766E",
"21CEF5FF054814ADC61753FFFF417F03",
"3B864BF96848A44E170A26D2791E0AE3", "3B864BF96848A44E170A26D2791E0AE3",
"85B78F013645D1EC53D5F3974528654A" "85B78F013645D1EC53D5F3974528654A"
] ]

1112
jd_fan.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -54,7 +54,7 @@ if ($.isNode()) {
} }
for (let j = 0; j < lottery.length; j++) { for (let j = 0; j < lottery.length; j++) {
$.configCode = lottery[j] $.configCode = lottery[j]
console.log(`抽奖机ID就位: ${$.configCode},准备开始薅豆`); console.log(`活动ID: ${$.configCode}`);
await getUA() await getUA()
await jdmodule(); await jdmodule();
//await showMsg(); //await showMsg();
@ -79,6 +79,7 @@ function showMsg() {
async function jdmodule() { async function jdmodule() {
let runTime = 0; let runTime = 0;
console.log('\n开始做任务');
do { do {
await getinfo(); //获取任务 await getinfo(); //获取任务
$.hasFinish = true; $.hasFinish = true;
@ -86,10 +87,16 @@ async function jdmodule() {
runTime++; runTime++;
} while (!$.hasFinish && runTime < 10); } while (!$.hasFinish && runTime < 10);
await getinfo(); await getinfo();
console.log("开始抽奖"); var num=1;
if ($.chanceLeft >= 1) {
console.log('\n开始抽奖');
} else {
console.log('\n没有抽奖机会了');
}
for (let x = 0; x < $.chanceLeft; x++) { for (let x = 0; x < $.chanceLeft; x++) {
await join(); await join(num);
await $.wait(1500) await $.wait(1500)
num++
} }
} }
@ -100,25 +107,29 @@ async function run() {
if (vo.hasFinish === true) { if (vo.hasFinish === true) {
continue; continue;
} }
if (!vo.taskItem) {
continue;
}
//console.log(vo);
if (vo.taskName == '每日签到') { if (vo.taskName == '每日签到') {
console.log(`开始做${vo.taskName}:${vo.taskItem.itemName}`); console.log(`${vo.taskName} => ${vo.taskItem.itemName}`);
await doTask(vo.taskType, vo.taskItem.itemId, vo.id); await doTask(vo.taskType, vo.taskItem.itemId, vo.id);
await getReward(vo.taskType, vo.taskItem.itemId, vo.id); await getReward(vo.taskType, vo.taskItem.itemId, vo.id);
} }
if (vo.taskType == 3) { if (vo.taskType == 3) {
console.log(`开始做${vo.taskName}:${vo.taskItem.itemName}`); console.log(`${vo.taskName} => ${vo.taskItem.itemName}`);
await getinfo2(vo.taskItem.itemLink); await getinfo2(vo.taskItem.itemLink);
await $.wait(1000 * vo.viewTime) await $.wait(1000 * vo.viewTime)
await doTask(vo.taskType, vo.taskItem.itemId, vo.id); await doTask(vo.taskType, vo.taskItem.itemId, vo.id);
await getReward(vo.taskType, vo.taskItem.itemId, vo.id); await getReward(vo.taskType, vo.taskItem.itemId, vo.id);
} }
if (vo.taskType == 4) { if (vo.taskType == 4) {
console.log(`开始做${vo.taskName}:${vo.taskItem.itemName}`); console.log(`${vo.taskName} => ${vo.taskItem.itemName}`);
await doTask(vo.taskType, vo.taskItem.itemId, vo.id); await doTask(vo.taskType, vo.taskItem.itemId, vo.id);
await getReward(vo.taskType, vo.taskItem.itemId, vo.id); await getReward(vo.taskType, vo.taskItem.itemId, vo.id);
} }
if (vo.taskType == 2) { if (vo.taskType == 2) {
console.log(`开始做${vo.taskName}:${vo.taskItem.itemName}`); console.log(`${vo.taskName} => ${vo.taskItem.itemName}`);
await doTask(vo.taskType, vo.taskItem.itemId, vo.id); await doTask(vo.taskType, vo.taskItem.itemId, vo.id);
await getReward(vo.taskType, vo.taskItem.itemId, vo.id); await getReward(vo.taskType, vo.taskItem.itemId, vo.id);
} }
@ -170,7 +181,7 @@ function getinfo() {
} }
//抽奖 //抽奖
function join() { function join(num) {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
$.get({ $.get({
url: `https://jdjoy.jd.com/module/task/draw/join?configCode=${$.configCode}&fp=${randomWord(false, 32, 32)}&eid=`, url: `https://jdjoy.jd.com/module/task/draw/join?configCode=${$.configCode}&fp=${randomWord(false, 32, 32)}&eid=`,
@ -193,7 +204,11 @@ function join() {
} else { } else {
data = JSON.parse(data); data = JSON.parse(data);
if (data.success == true) { if (data.success == true) {
console.log(`抽奖结果:${data.data.rewardName}`); if (data.data.rewardName == null) {
console.log(`${num}次获得: 空气`);
} else {
console.log(`${num}次获得: ${data.data.rewardName}`);
}
} }
else { else {
console.log(data.errorMessage); console.log(data.errorMessage);
@ -220,7 +235,7 @@ function doTask(taskType, itemId, taskid) {
} else { } else {
data = JSON.parse(data); data = JSON.parse(data);
if (data.success == true) { if (data.success == true) {
console.log("任务成功"); // console.log("任务成功");
} else { } else {
console.log(data.errorMessage); console.log(data.errorMessage);
} }
@ -247,7 +262,7 @@ function getReward(taskType, itemId, taskid) {
} else { } else {
data = JSON.parse(data); data = JSON.parse(data);
if (data.success == true) { if (data.success == true) {
console.log("任务奖励领取成功"); //console.log("任务奖励领取成功");
} else { } else {
console.log(data.errorMessage); console.log(data.errorMessage);
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long