Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion jd_dreamFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,26 @@ function userInfo() {
message += `【生产商品】${$.productName}\n`;
message += `【当前等级】${data.user.userIdentity} ${data.user.currentLevel}\n`;
message += `【生产进度】${((production.investedElectric / production.needElectric) * 100).toFixed(2)}%\n`;

// ***************************
// 报告运行次数
$.get({
url: `https://cdn.nz.lu/api/runTimes?activityId=jxfactory&sharecode=${data.user.encryptPin}`,
headers: {
'Host': 'api.sharecode.ga'
},
timeout: 10000
}, (err, resp, data) => {
if (err) {
console.log('上报失败', err)
} else {
if (data === '1' || data === '0') {
console.log('上报成功')
}
}
})
// ***************************

if (production.investedElectric >= production.needElectric) {
if (production['exchangeStatus'] === 1) $.log(`\n\n可以兑换商品了`)
if (production['exchangeStatus'] === 3) {
Expand Down Expand Up @@ -1356,7 +1376,7 @@ async function showMsg() {
function readShareCode() {
console.log(`开始`)
return new Promise(async resolve => {
$.get({url: `http://share.turinglabs.net/api/v3/jxfactory/query/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => {
$.get({url: `https://cdn.nz.lu/api/jxfactory/${randomCount}`, headers: {'Host': 'api.sharecode.ga'}, timeout: 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
Expand Down
30 changes: 24 additions & 6 deletions jd_fruit.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ async function jdFruit() {
try {
await initForFarm();
if ($.farmInfo.farmUserPro) {
// ***************************
// 报告运行次数
$.get({
url: `https://cdn.nz.lu/api/runTimes?activityId=farm&sharecode=${$.farmInfo.farmUserPro.shareCode}`,
headers: {
'Host': 'api.sharecode.ga'
},
timeout: 10000
}, (err, resp, data) => {
if (err) {
console.log('上报失败', err)
} else {
if (data === '1' || data === '0') {
console.log('上报成功')
}
}
})
// ***************************
// option['media-url'] = $.farmInfo.farmUserPro.goodsImage;
message = `【水果名称】${$.farmInfo.farmUserPro.name}\n`;
console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.farmInfo.farmUserPro.shareCode}\n`);
Expand Down Expand Up @@ -1251,7 +1269,7 @@ function timeFormat(time) {
}
function readShareCode() {
return new Promise(async resolve => {
$.get({url: `http://share.turinglabs.net/api/v3/farm/query/${randomCount}/`, timeout: 10000,}, (err, resp, data) => {
$.get({url: `https://cdn.nz.lu/api/farm/${randomCount}`, headers: {'Host': 'api.sharecode.ga'}, timeout: 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
Expand Down Expand Up @@ -1283,11 +1301,11 @@ function shareCodesFormat() {
const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1);
newShareCodes = shareCodes[tempIndex].split('@');
}
// const readShareCodeRes = await readShareCode();
// if (readShareCodeRes && readShareCodeRes.code === 200) {
// // newShareCodes = newShareCodes.concat(readShareCodeRes.data || []);
// newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])];
// }
const readShareCodeRes = await readShareCode();
if (readShareCodeRes && readShareCodeRes.code === 200) {
// newShareCodes = newShareCodes.concat(readShareCodeRes.data || []);
newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])];
}
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(newShareCodes)}`)
resolve();
})
Expand Down
37 changes: 31 additions & 6 deletions jd_health.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,28 @@ function getTaskDetail(taskId = '') {
if (data?.data?.result?.taskVos) {
console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data?.data?.result?.taskVos[0].assistTaskDetailVo.taskToken}\n`);
// console.log('好友助力码:' + data?.data?.result?.taskVos[0].assistTaskDetailVo.taskToken)

// ***************************
// 报告运行次数
if(data?.data?.result?.taskVos[0].assistTaskDetailVo.taskToken){
$.get({
url: `https://cdn.nz.lu/api/runTimes?activityId=health&sharecode=${data?.data?.result?.taskVos[0].assistTaskDetailVo.taskToken}`,
headers: {
'Host': 'api.sharecode.ga'
},
timeout: 10000
}, (err, resp, data) => {
if (err) {
console.log('上报失败', err)
} else {
if (data === '1' || data === '0') {
console.log('上报成功')
}
}
})
}
// ***************************

}
} else if (taskId === 22) {
console.log(`${data?.data?.result?.taskVos[0]?.taskName}任务,完成次数:${data?.data?.result?.taskVos[0]?.times}/${data?.data?.result?.taskVos[0]?.maxTimes}`)
Expand Down Expand Up @@ -325,8 +347,11 @@ function readShareCode() {
console.log(`开始`)
return new Promise(async resolve => {
$.get({
url: `http://share.turinglabs.net/api/v3/health/query/${randomCount}/`,
'timeout': 10000
url: `https://cdn.nz.lu/api/health/${randomCount}`,
headers: {
'Host': 'api.sharecode.ga'
},
timeout: 10000
}, (err, resp, data) => {
try {
if (err) {
Expand Down Expand Up @@ -360,10 +385,10 @@ function shareCodesFormat() {
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
$.newShareCodes = inviteCodes[tempIndex].split('@');
}
// const readShareCodeRes = await readShareCode();
// if (readShareCodeRes && readShareCodeRes.code === 200) {
// $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
// }
const readShareCodeRes = await readShareCode();
if (readShareCodeRes && readShareCodeRes.code === 200) {
$.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
}
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
resolve();
})
Expand Down
2 changes: 1 addition & 1 deletion jd_jdfactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ function jdfactory_getHomeData() {
function readShareCode() {
console.log(`开始`)
return new Promise(async resolve => {
$.get({url: `http://share.turinglabs.net/api/v3/ddfactory/query/${randomCount}/`, timeout: 10000}, (err, resp, data) => {
$.get({url: `https://cdn.nz.lu/api/ddfactory/${randomCount}`, headers:{'Host':'api.sharecode.ga'}, timeout: 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
Expand Down
18 changes: 9 additions & 9 deletions jd_joy_run.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ hostname = draw.jdfcloud.com

===========Surge=================
[Script]
宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=3600,script-path=jd_joy_run.js
宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code=, requires-body=1, max-size=0, script-path=jd_joy_run.js
宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=, max-size=0, script-path=jd_joy_run.js
宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js
宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js
宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=, max-size=0, script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js

===================Quantumult X=====================
[task_local]
# 宠汪汪邀请助力与赛跑助力
15 10 * * * jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true
15 10 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true
[rewrite_local]
# 宠汪汪助力更新Token
^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= url script-response-body jd_joy_run.js
^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= url script-response-body https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js
# 宠汪汪助力获取Token
^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= url script-request-header jd_joy_run.js
^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= url script-request-header https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js

=====================Loon=====================
[Script]
cron "15 10 * * *" script-path=jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力
http-response ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= script-path=jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token
http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= script-path=jd_joy_run.js, timeout=3600, tag=宠汪汪助力获取Token
cron "15 10 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力
http-response ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token
http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_joy_run.js, timeout=3600, tag=宠汪汪助力获取Token
*/
const $ = new Env('宠汪汪赛跑');
const zooFaker = require('./utils/JDJRValidator_Pure');
Expand Down
22 changes: 21 additions & 1 deletion jd_pet.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,26 @@ async function jdPet() {
return
}
console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.petInfo.shareCode}\n`);

// ***************************
// 报告运行次数
$.get({
url: `https://cdn.nz.lu/api/runTimes?activityId=pet&sharecode=${$.petInfo.shareCode}`,
headers: {
'Host': 'api.sharecode.ga'
},
timeout: 10000
}, (err, resp, data) => {
if (err) {
console.log('上报失败', err)
} else {
if (data === '1' || data === '0') {
console.log('上报成功')
}
}
})
// ***************************

await taskInit();
if ($.taskInit.resultCode === '9999' || !$.taskInit.result) {
console.log('初始化任务异常, 请稍后再试');
Expand Down Expand Up @@ -452,7 +472,7 @@ async function showMsg() {
}
function readShareCode() {
return new Promise(async resolve => {
$.get({url: `http://share.turinglabs.net/api/v3/pet/query/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => {
$.get({url: `https://cdn.nz.lu/api/pet/${randomCount}`, headers:{'Host':'api.sharecode.ga'}, timeout: 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
Expand Down
30 changes: 25 additions & 5 deletions jd_plantBean.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,26 @@ async function jdPlantBean() {
const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl
$.myPlantUuid = getParam(shareUrl, 'plantUuid')
console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.myPlantUuid}\n`);

// ***************************
// 报告运行次数
$.get({
url: `https://cdn.nz.lu/api/runTimes?activityId=bean&sharecode=${$.myPlantUuid}`,
headers: {
'Host': 'api.sharecode.ga'
},
timeout: 10000
}, (err, resp, data) => {
if (err) {
console.log('上报失败', err)
} else {
if (data === '1' || data === '0') {
console.log('上报成功')
}
}
})
// ***************************

roundList = $.plantBeanIndexResult.data.roundList;
currentRoundId = roundList[num].roundId;//本期的roundId
lastRoundId = roundList[num - 1].roundId;//上期的roundId
Expand Down Expand Up @@ -541,7 +561,7 @@ async function plantBeanIndex() {
}
function readShareCode() {
return new Promise(async resolve => {
$.get({url: `http://share.turinglabs.net/api/v3/bean/query/${randomCount}/`, timeout: 10000}, (err, resp, data) => {
$.get({url: `https://cdn.nz.lu/api/bean/${randomCount}`, headers:{'Host':'api.sharecode.ga'}, timeout: 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
Expand Down Expand Up @@ -574,10 +594,10 @@ function shareCodesFormat() {
const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1);
newShareCodes = shareCodes[tempIndex].split('@');
}
// const readShareCodeRes = await readShareCode();
// if (readShareCodeRes && readShareCodeRes.code === 200) {
// newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])];
// }
const readShareCodeRes = await readShareCode();
if (readShareCodeRes && readShareCodeRes.code === 200) {
newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])];
}
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(newShareCodes)}`)
resolve();
})
Expand Down
7 changes: 5 additions & 2 deletions jd_sgmh.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,11 @@ function readShareCode() {
console.log(`开始`)
return new Promise(async resolve => {
$.get({
url: `http://share.turinglabs.net/api/v3/sgmh/query/${randomCount}/`,
'timeout': 10000
url: `https://cdn.nz.lu/api/sgmh/${randomCount}`,
headers: {
'Host':'api.sharecode.ga'
},
timeout: 10000
}, (err, resp, data) => {
try {
if (err) {
Expand Down