Skip to content

Commit b39d21f

Browse files
committed
update
1 parent 6d1176f commit b39d21f

File tree

5 files changed

+183
-125
lines changed

5 files changed

+183
-125
lines changed

jd_cfd_pearl_ex.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ async function perl_auto() {
8686
}
8787
return flag
8888
})
89+
await wait()
8990
if (!prizes.length) {
9091
console.log('无红包满足条件,结束')
9192
return
@@ -104,7 +105,6 @@ async function perl_auto() {
104105
})
105106
}
106107
// console.debug('prizes:',prizes)
107-
await wait()
108108
for (let i = 0; i < prizes.length; i++) {
109109
const prize = prizes[i]
110110
console.log('兑换面额:', prize.strPrizeName || '随机红包')

jd_joy_park.js

+56-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ message = ""
114114
await doJoyMoveDownAll($.workJoyInfoList)
115115
//从低合到高
116116
await doJoyMergeAll($.activityJoyList)
117-
await getJoyList(true)
117+
await getGameMyPrize()
118118
}
119119
}
120120
})()
@@ -135,7 +135,7 @@ async function getJoyBaseInfo(taskId = '', inviteType = '', inviterPin = '', pri
135135
if (printLog) {
136136
$.log(`等级: ${data.data.level}|金币: ${data.data.joyCoin}`);
137137
if (data.data.level >= 30 && $.isNode()) {
138-
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}${$.nickName || $.UserName}\n当前等级: ${data.data.level}\n已达到单次最高等级奖励\n请尽快前往活动查看领取\n活动入口:京东极速版APP->汪汪乐园\n更多脚本->"https://github.com/zero205/JD_tencent_scf"`);
138+
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}${$.nickName || $.UserName}\n当前等级: ${data.data.level}\n已达到单次最高等级奖励\n请前往京东极速版APP查看使用优惠券\n活动入口:京东极速版APP->我的->汪汪乐园`);
139139
$.log(`\n开始解锁新场景...\n`);
140140
await doJoyRestart()
141141
}
@@ -436,6 +436,60 @@ function doJoyRestart() {
436436
})
437437
}
438438

439+
function getGameMyPrize() {
440+
return new Promise(resolve => {
441+
$.post(taskPostClientActionUrl(`body={"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `gameMyPrize`), async (err, resp, data) => {
442+
try {
443+
if (err) {
444+
console.log(`${JSON.stringify(err)}`)
445+
console.log(`${$.name} API请求失败,请检查网路重试`)
446+
} else {
447+
data = JSON.parse(data);
448+
if (data.success && data.data) {
449+
$.Vos = data.data.gamePrizeItemVos
450+
for (let i = 0; i < $.Vos.length; i++) {
451+
if ($.Vos[i].prizeType == 4 && $.Vos[i].status == 1 && $.Vos[i].prizeTypeVO.prizeUsed == 0) {
452+
$.log(`\n当前账号有【${$.Vos[i].prizeName}】可提现`)
453+
$.id = $.Vos[i].prizeTypeVO.id
454+
$.poolBaseId = $.Vos[i].prizeTypeVO.poolBaseId
455+
$.prizeGroupId = $.Vos[i].prizeTypeVO.prizeGroupId
456+
$.prizeBaseId = $.Vos[i].prizeTypeVO.prizeBaseId
457+
await apCashWithDraw($.id, $.poolBaseId, $.prizeGroupId, $.prizeBaseId)
458+
}
459+
}
460+
}
461+
}
462+
} catch (e) {
463+
$.logErr(e, resp)
464+
} finally {
465+
resolve(data);
466+
}
467+
})
468+
})
469+
}
470+
471+
function apCashWithDraw(id, poolBaseId, prizeGroupId, prizeBaseId) {
472+
return new Promise(resolve => {
473+
$.post(taskPostClientActionUrl(`body={"businessSource":"JOY_PARK","base":{"id":${id},"business":"joyPark","poolBaseId":${poolBaseId},"prizeGroupId":${prizeGroupId},"prizeBaseId":${prizeBaseId},"prizeType":4},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&_t=${+new Date()}&appid=activities_platform`, `apCashWithDraw`), async (err, resp, data) => {
474+
try {
475+
if (err) {
476+
console.log(`${JSON.stringify(err)}`)
477+
console.log(`${$.name} API请求失败,请检查网路重试`)
478+
} else {
479+
data = JSON.parse(data);
480+
if (data.success && data.data) {
481+
console.log(`提现结果:${JSON.stringify(data)}`)
482+
}
483+
}
484+
} catch (e) {
485+
$.logErr(e, resp)
486+
} finally {
487+
resolve(data);
488+
}
489+
})
490+
})
491+
}
492+
439493
function getShareCode() {
440494
return new Promise(resolve => {
441495
$.get({

jd_jxmc.js

+67-67
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)