1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2026-05-01 18:06:41 +08:00

Merge branch '6dylan6:main' into main

This commit is contained in:
milletbig
2023-06-17 16:52:35 +08:00
committed by GitHub
17 changed files with 202 additions and 898 deletions
+6 -16
View File
@@ -1,19 +1,11 @@
## 6dy
>加密审查,无重复,默认不开卡加购,内部互助(可调模式);
声明: 此库所有内容仅用于测试学习,测试完后请自行删除!!!
### [TG频道](https://t.me/dylan_jdpro)
>欢迎大家issue、pr,会一一回复!
### 注意ck安全,谨慎执行不明来历的js、app、exe、插件等,过期ck都能复活(还有其他不为人知的手段。。。)!
### 已知MaiARK短信登录工具偷CK,不要使用!!!
### 防走失[TG频道](https://t.me/dylan_jdpro)
### 一键部署(2.11.3版本青龙,默认国内机拉库命令,建好后根据自己情况调整)
### 一键部署(2.11.3版本青龙)
使用root用户运行下面一串命令,仅在Centos/Ubuntu系统测试,其他系统自测
@@ -23,9 +15,7 @@ curl -sSL https://js.nbplay.site/https://raw.githubusercontent.com/6dylan6/jdpro
## 拉库指令
【注意】2.11.1前版本青龙config.sh配置把GithubProxyUrl="https://ghproxy.com/ (差不在多19行)" 修改为GithubProxyUrl="",否则拉取失败,以上版本无需配置。
2.13版本以上青龙拉库方式变了,到订阅管理新建订阅,正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
国内机用下面指令(带代理):
@@ -33,7 +23,7 @@ curl -sSL https://js.nbplay.site/https://raw.githubusercontent.com/6dylan6/jdpro
ql repo https://js.nbplay.site/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify"
```
默认代理拉不了,自行找可用代理
默认代理拉不了,自行找可用代理
国外机(无需代理)用下面指令:
@@ -56,7 +46,7 @@ ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|U
1、青龙部署。
2、修改青龙config.sh配置,差不多在17行(特别注意,没有修改此配置,任务拉不全,一键部署可忽略此处);
2、登录青龙配置管理config.sh修改,差不多在17行(特别注意,没有修改此配置,任务拉不全,一键部署可忽略此处);
RepoFileExtensions="js py"修改为 RepoFileExtensions="js py sh ts" 保存;
+1 -1
View File
File diff suppressed because one or more lines are too long
-24
View File
File diff suppressed because one or more lines are too long
+24
View File
File diff suppressed because one or more lines are too long
+24
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
File diff suppressed because one or more lines are too long
+18 -10
View File
@@ -1,7 +1,7 @@
/*
东东农场助力
20 2,5 * * * jd_farm_help.js
updatetime:2022/12/22
20 2,6 * * * jd_farm_help.js
updatetime:2023/6/14
dlan
变量
epxort FRUIT_DELAY = '1000',设置等待时间(毫秒)默认请求5次接口等待60秒60000
@@ -20,6 +20,7 @@ const retainWater = 100;//保留水滴大于多少g,默认100g;
let jdNotify = false;//是否关闭通知,false打开通知推送,true关闭通知推送
let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),true表示换豆(不浇水),false表示不换豆(继续浇水),脚本默认是浇水
let randomCount = $.isNode() ? 20 : 5;
const fs = require('fs');
const JD_API_HOST = 'https://api.m.jd.com/client.action';
const delay = process.env.FRUIT_DELAY || 60000;
const urlSchema = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html%22%20%7D`;
@@ -1133,13 +1134,20 @@ 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 || [])])];
// }
newShareCodes = newShareCodes.filter(item => fulled.indexOf(item) == -1 && !!item);
console.log(`${$.index}个京东账号将要助力的好友${JSON.stringify(newShareCodes)}`)
let ex = fs.existsSync('./fruit_helpcode');
if (newShareCodes.length === 0 && ex) {
$.log(`使用本地缓存\n`);
newShareCodes = fs.readFileSync('./fruit_helpcode', 'utf-8');
newShareCodes = JSON.parse(newShareCodes);
}
console.log(`您提供了${newShareCodes.length}个农场助力码\n`);
console.log(`${$.index}个账号将要助力的好友${JSON.stringify(newShareCodes)}`);
resolve();
})
}
@@ -1170,7 +1178,7 @@ function requireConfig() {
} else {
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
}
console.log(`${cookiesArr.length}个京东账号\n`)
//console.log(`共${cookiesArr.length}个京东账号\n`)
$.shareCodesArr = [];
if ($.isNode()) {
Object.keys(shareCodes).forEach((item) => {
@@ -1184,7 +1192,7 @@ function requireConfig() {
}
// console.log(`$.shareCodesArr::${JSON.stringify($.shareCodesArr)}`)
// console.log(`jdFruitShareArr账号长度::${$.shareCodesArr.length}`)
console.log(`您提供了${$.shareCodesArr.length}个账号的农场助力码\n`);
//console.log(`您提供了${$.shareCodesArr.length}个账号的农场助力码\n`);
resolve()
})
}
+5 -5
View File
@@ -14,8 +14,8 @@ function fix(){
rm -rf /ql/data/repo/6dylan6_jdpro
#ql repo https://ghproxy.com/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify"
else
echo -e '修复失败!\n将下面目录结构截图提问'
find /ql -maxdepth 2 -type d
echo -e '无需修复,拉不动可能是代理问题'
#find /ql -maxdepth 2 -type d
return 1
fi
else
@@ -26,8 +26,8 @@ function fix(){
rm -rf /ql/data/repo/6dylan6_jdpro_main
#ql repo https://ghproxy.com/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify" "main"
else
echo -e '修复失败!将下面目录结构截图提问\n'
find /ql -maxdepth 2 -type d
echo -e '无需修复,拉不动可能是代理问题\n'
#find /ql -maxdepth 2 -type d
return 1
fi
fi
@@ -35,5 +35,5 @@ function fix(){
fix
[[ $(echo $?) -eq 0 ]] && echo -e '修复完成,再拉库试试!,如果还不行是网络问题!!!'
[[ $(echo $?) -eq 0 ]] && echo -e '修复完成,再拉库试试!,如果还不行是网络或代理问题!!!'
+12 -10
View File
@@ -7,14 +7,14 @@
==========================Quantumultx=========================
[task_local]
#jd免费水果
10 6-18/6 * * * jd_fruit.js, tag=东东农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true
15 3,13,18 * * * jd_fruit.js, tag=东东农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true
=========================Loon=============================
[Script]
cron "10 6-18/6 * * *" script-path=jd_fruit.js,tag=东东农场
cron "15 3,13,18 * * *" script-path=jd_fruit.js,tag=东东农场
=========================Surge============================
东东农场 = type=cron,cronexp="10 6-18/6 * * *",wake-system=1,timeout=3600,script-path=jd_fruit.js
东东农场 = type=cron,cronexp="15 3,13,18 * * *",wake-system=1,timeout=3600,script-path=jd_fruit.js
=========================小火箭===========================
东东农场 = type=cron,script-path=jd_fruit.js, cronexpr="10 6-18/6 * * *", timeout=3600, enable=true
东东农场 = type=cron,script-path=jd_fruit.js, cronexpr="15 3,13,18 * * *", timeout=3600, enable=true
jd免费水果 搬的https://github.com/liuxiaoyucc/jd-helper/blob/a6f275d9785748014fc6cca821e58427162e9336/fruit/fruit.js
变量
export DO_TEN_WATER_AGAIN='true' 攒水滴只交10次水默认不攒水滴
@@ -24,11 +24,7 @@ epxort FRUIT_DELAY = '1000',设置等待时间(毫秒),默认请求5次接口
const $ = new Env('东东农场-任务');
let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = '';
//助力好友分享码(最多3个,否则后面的助力失败),原因:京东农场每人每天只有3次助力机会
//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。
//下面给出两个账号的填写示例(iOS只支持2个京东账号)
let shareCodes = [ // 这个列表填入你要助力的好友的shareCode
''
]
let shareCodes = ['']
let message = '', subTitle = '', option = {}, isFruitFinished = false, ct = 0;
const retainWater = 100;//保留水滴大于多少g,默认100g;
@@ -39,7 +35,10 @@ const JD_API_HOST = 'https://api.m.jd.com/client.action';
const urlSchema = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html%22%20%7D`;
const delay = process.env.FRUIT_DELAY || 60000;
const ua = require('./USER_AGENTS');
const fs = require('fs');
let cachecode = [];
$.reqnum = 1;
fs.existsSync('./fruit_helpcode') && (cachecode = JSON.parse(fs.readFileSync('./fruit_helpcode', 'utf8')));
!(async () => {
await requireConfig();
if (!cookiesArr[0]) {
@@ -75,6 +74,7 @@ $.reqnum = 1;
await jdFruit();
}
}
fs.writeFile('./fruit_helpcode', JSON.stringify(cachecode), (e) => { e && console.log(e) });
if ($.isNode() && allMessage && $.ctrTemp) {
await notify.sendNotify(`${$.name}`, `${allMessage}`)
}
@@ -89,10 +89,12 @@ async function jdFruit() {
subTitle = `【京东账号${$.index}🆔】${$.nickName || $.UserName}`;
try {
await initForFarm();
if ($.farmInfo.farmUserPro) {
// option['media-url'] = $.farmInfo.farmUserPro.goodsImage;
message = `【水果名称】${$.farmInfo.farmUserPro.name}\n`;
console.log(`\n【京东账号${$.index}${$.UserName})的${$.name}好友互助码】${$.farmInfo.farmUserPro.shareCode}\n`);
!cachecode.includes($.farmInfo.farmUserPro.shareCode) && cachecode.push($.farmInfo.farmUserPro.shareCode);
console.log(`\n【已成功兑换水果】${$.farmInfo.farmUserPro.winTimes}\n`);
message += `【已兑换水果】${$.farmInfo.farmUserPro.winTimes}\n`;
//await masterHelpShare();//助力好友
@@ -1399,7 +1401,7 @@ function requireConfig() {
} else {
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
}
console.log(`${cookiesArr.length}个京东账号\n`)
//console.log(`共${cookiesArr.length}个京东账号\n`)
$.shareCodesArr = [];
if ($.isNode()) {
Object.keys(shareCodes).forEach((item) => {
+1 -1
View File
File diff suppressed because one or more lines are too long
+26
View File
File diff suppressed because one or more lines are too long
+26
View File
File diff suppressed because one or more lines are too long
-26
View File
File diff suppressed because one or more lines are too long
+4 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
-367
View File
File diff suppressed because one or more lines are too long
-381
View File
File diff suppressed because one or more lines are too long