更新于 07-14 21:28

This commit is contained in:
root
2021-07-14 21:28:53 -04:00
parent aa8bc34f33
commit a61788b616
2 changed files with 26 additions and 26 deletions

View File

@@ -2,7 +2,7 @@
jd宠汪汪 搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_joy.js
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
IOS用户支持京东双账号,NodeJs用户支持N个京东账号
更新时间2021-6-6
更新时间2021-7-15
活动入口京东APP我的-更多工具-宠汪汪
建议先凌晨0点运行jd_joy.js脚本获取狗粮后再运行此脚本(jd_joy_steal.js)可偷好友积分6点运行可偷好友狗粮
feedCount:自定义 每次喂养数量; 等级只和喂养次数有关,与数量无关
@@ -415,7 +415,7 @@ function getDeskGoodDetails() {
// const url = `${JD_API_HOST}/getDeskGoodDetails`;
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}/common/pet/getDeskGoodDetails?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/getDeskGoodDetails?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -442,7 +442,7 @@ function followScan(sku) {
"reqSource": "h5",
sku
}
const url = `${JD_API_HOST}/common/pet/scan?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/scan?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.post(taskPostUrl(url, JSON.stringify(body), reqSource, host, 'application/json'), (err, resp, data) => {
try {
if (err) {
@@ -464,7 +464,7 @@ function scanMarket(type, body, cType = 'application/json') {
// const url = `${weAppUrl}/${type}`;
const host = `jdjoy.jd.com`;
const reqSource = 'weapp';
const url = `${JD_API_HOST}/common/pet/${type}?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/${type}?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
if (cType === 'application/json') {
body = JSON.stringify(body)
}
@@ -489,7 +489,7 @@ function appScanMarket(type, body) {
// const url = `${JD_API_HOST}/${type}`;
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}/common/pet/${type}?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/${type}?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.post(taskPostUrl(url, JSON.stringify(body), reqSource, host, 'application/json'), (err, resp, data) => {
try {
if (err) {
@@ -513,7 +513,7 @@ function sign() {
// const url = `${weAppUrl}/getFood?reqSource=weapp&taskType=${type}`;
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}/common/pet/sign?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE&taskType=SignEveryDay`
const url = `${JD_API_HOST}/common/pet/sign?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F&taskType=SignEveryDay`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -536,7 +536,7 @@ function getFood(type) {
// const url = `${weAppUrl}/getFood?reqSource=weapp&taskType=${type}`;
const host = `jdjoy.jd.com`;
const reqSource = 'weapp';
const url = `${JD_API_HOST}/common/pet/getFood?reqSource=weapp&taskType=${type}&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/getFood?reqSource=weapp&taskType=${type}&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -559,9 +559,9 @@ function iconClick(type, id) {
// const url = `${weAppUrl}/getFood?reqSource=weapp&taskType=${type}`;
const host = `jdjoy.jd.com`;
const reqSource = 'weapp';
// ${JD_API_HOST}/common/pet/icon/click?iconCode=follow_channel&linkAddr=363&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE
// ${JD_API_HOST}/common/pet/icon/click?iconCode=follow_channel&linkAddr=363&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F
// console.log(type, id)
const url = `${JD_API_HOST}/common/pet/icon/click?iconCode=${type}&linkAddr=${id}&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/icon/click?iconCode=${type}&linkAddr=${id}&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -584,8 +584,8 @@ function followShop(shopId) {
const body = `shopId=${shopId}`;
const reqSource = 'weapp';
const host = 'jdjoy.jd.com';
// ${JD_API_HOST}/common/pet/followShop?validate=59d15039c5ad4d24af48fcec798962bf&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE
const url = `${JD_API_HOST}/common/pet/followShop?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
// ${JD_API_HOST}/common/pet/followShop?validate=59d15039c5ad4d24af48fcec798962bf&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F
const url = `${JD_API_HOST}/common/pet/followShop?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.post(taskPostUrl(url, body, reqSource, host,'application/x-www-form-urlencoded'), (err, resp, data) => {
try {
if (err) {
@@ -606,7 +606,7 @@ function enterRoom() {
// const url = `${weAppUrl}/enterRoom/h5?reqSource=weapp&invitePin=&openId=`;
const host = `jdjoy.jd.com`;
const reqSource = 'weapp';
const url = `${JD_API_HOST}/common/pet/enterRoom/h5?reqSource=h5&invitePin=&openId=&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/enterRoom/h5?reqSource=h5&invitePin=&openId=&invokeKey=qRKHmL4sna8ZOP9F`
$.post({...taskUrl(url, host, reqSource),body:'{}'}, (err, resp, data) => {
try {
if (err) {
@@ -634,7 +634,7 @@ function appGetPetTaskConfig() {
// const url = `${JD_API_HOST}/getPetTaskConfig?reqSource=h5`;
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}/common/pet/getPetTaskConfig?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/getPetTaskConfig?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -660,7 +660,7 @@ function feedPets(feedNum) {
// const url = `${weAppUrl}/feed?feedCount=${feedNum}&reqSource=weapp`;
const host = `jdjoy.jd.com`;
const reqSource = 'weapp';
const url = `${JD_API_HOST}/common/pet/feed?feedCount=${feedNum}&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/feed?feedCount=${feedNum}&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), async (err, resp, data) => {
try {
if (err) {
@@ -712,7 +712,7 @@ function getPetTaskConfig() {
// const reqSource = 'h5';
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}//common/pet/getPetTaskConfig?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}//common/pet/getPetTaskConfig?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -735,7 +735,7 @@ function getPetRace() {
// const url = `${JD_API_HOST}/combat/detail/v2?help=false`;
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}/common/pet/combat/detail/v2?help=false&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/combat/detail/v2?help=false&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -758,7 +758,7 @@ function getRankList() {
return new Promise(resolve => {
// const url = `${JD_API_HOST}/combat/getRankList`;
$.raceUsers = [];
const url = `${JD_API_HOST}/common/pet/combat/getRankList?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/combat/getRankList?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, `jdjoy.jd.com`, 'h5'), (err, resp, data) => {
try {
if (err) {
@@ -787,7 +787,7 @@ function runMatch(teamLevel, timeout = 10000) {
// const url = `${JD_API_HOST}/combat/match?teamLevel=${teamLevel}`;
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}/common/pet/combat/match?teamLevel=${teamLevel}&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/combat/match?teamLevel=${teamLevel}&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -811,7 +811,7 @@ function getBackupInfo() {
// const url = `${JD_API_HOST}/combat/getBackupInfo`;
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}/common/pet/combat/getBackupInfo?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/combat/getBackupInfo?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -833,7 +833,7 @@ function getBackupInfo() {
function getWinCoin() {
return new Promise(resolve => {
// const url = `${weAppUrl}/combat/detail/v2?help=false&reqSource=weapp`;
const url = `${JD_API_HOST}/common/pet/combat/detail/v2?help=false&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/combat/detail/v2?help=false&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, 'jdjoy.jd.com', `h5`), (err, resp, data) => {
try {
if (err) {
@@ -859,7 +859,7 @@ function receiveJoyRunAward() {
// const url = `${JD_API_HOST}/combat/receive`;
const host = `jdjoy.jd.com`;
const reqSource = 'h5';
const url = `${JD_API_HOST}/common/pet/combat/receive?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/combat/receive?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, host, reqSource), (err, resp, data) => {
try {
if (err) {
@@ -902,7 +902,7 @@ async function energySupplyStation(showOrder) {
function getSupplyInfo(showOrder) {
return new Promise(resolve => {
// const url = `${weAppUrl}/combat/getSupplyInfo?showOrder=${showOrder}`;
const url = `${JD_API_HOST}/common/pet/combat/getSupplyInfo?showOrder=${showOrder}&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/combat/getSupplyInfo?showOrder=${showOrder}&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
$.get(taskUrl(url, 'jdjoy.jd.com', `weapp`), (err, resp, data) => {
try {
if (err) {

View File

@@ -1,5 +1,5 @@
/*
Last Modified time: 2021-6-6 10:22:37
Last Modified time: 2021-7-15 8:22:37
活动入口京东APP我的-更多工具-宠汪汪
最近经常出现给偷好友积分与狗粮失败的情况故建议cron设置为多次
jd宠汪汪偷好友积分与狗粮,及给好友喂食
@@ -286,7 +286,7 @@ async function helpFriendsFeed() {
}
function getFriends(currentPage = '1') {
return new Promise(resolve => {
const url = `${JD_API_HOST}/common/pet/h5/getFriends?itemsPerPage=20&currentPage=${currentPage * 1}&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/h5/getFriends?itemsPerPage=20&currentPage=${currentPage * 1}&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
const options = {
url,
headers: {
@@ -465,7 +465,7 @@ function getRandomFood(friendPin) {
}
function getCoinChanges() {
return new Promise(resolve => {
const url = `${JD_API_HOST}/common/pet/getCoinChanges?changeDate=${Date.now()}&reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE`
const url = `${JD_API_HOST}/common/pet/getCoinChanges?changeDate=${Date.now()}&reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F`
const options = {
url,
headers: {
@@ -583,7 +583,7 @@ function TotalBean() {
})
}
function taskUrl(functionId, friendPin) {
const url = `${JD_API_HOST}/common/pet/${functionId}?reqSource=h5&invokeKey=NRp8OPxZMFXmGkaE${friendPin && "&friendPin=" + encodeURI(friendPin)}`
const url = `${JD_API_HOST}/common/pet/${functionId}?reqSource=h5&invokeKey=qRKHmL4sna8ZOP9F${friendPin && "&friendPin=" + encodeURI(friendPin)}`
return {
url,
headers: {