Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesyy committed Oct 27, 2021
1 parent 4912b80 commit 18c9a28
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 232 deletions.
2 changes: 1 addition & 1 deletion jd_big_winner.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function main() {
await gambleOpenReward();//打开红包
if ($.canOpenRed) {
let time = 3
while (!$.canApCashWithDraw && $.changeReward && i--) {
while (!$.canApCashWithDraw && $.changeReward && time--) {
await openRedReward();
await $.wait(500);
}
Expand Down
24 changes: 13 additions & 11 deletions jd_city.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
城城领现金
首个帐号助力作者,其余帐号优先向前内部互助,作者和池子在最后
优先助力池子,请入群上车!
首个帐号助力作者池子在最后
其余帐号优先助力池子,请入群上车!
活动时间:2021-05-25到2021-06-03
更新时间:2021-05-24 09:55
脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js
Expand Down Expand Up @@ -40,7 +40,7 @@ const self_code = []
let pool = []
!(async () => {
console.log('内部互助没奖励了吧应该. 城城现在改为优先助力池子!(作者只吃第一个CK,其余池子!) 请查看群内频道通知!,10s后开始!')
await $.wait(10000)
await $.wait(5000)
if (!cookiesArr[0]) {
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});
return;
Expand Down Expand Up @@ -78,24 +78,26 @@ let pool = []
for (let i = 0; i < $.newShareCodes.length; ++i) {
console.log(`开始助力 【${$.newShareCodes[i]}】`)
let res = await getInfo($.newShareCodes[i])
// console.debug(res)
if (res.code == '-10001'){
console.warn('请求参数错误,跳过')
continue
}
if (res && res['data']['bizCode'] === 0) {
// console.debug(res)
if (res && res['data'] && res['data']['bizCode'] === 0) {
if (res['data']['result']['toasts'] && res['data']['result']['toasts'][0] && res['data']['result']['toasts'][0]['status'] === '3') {
console.log(`助力次数已耗尽,跳出`)
break
}
if (res['data']['result']['toasts'] && res['data']['result']['toasts'][0]) {
console.log(`助力 【${$.newShareCodes[i]}】:${res.data.result.toasts[0].msg}`)
if (res['data']['result']['toasts']) {
if (res['data']['result']['toasts'][0]) {
console.log(`助力 【${$.newShareCodes[i]}】:${res.data.result.toasts[0].msg}`)
} else {
console.log(`未知错误,跳出`)
break
}
}
}
if ((res && res['status'] && res['status'] === '3') || (res && res.data && res.data.bizCode === -11)) {
// 助力次数耗尽 || 黑号
break
}
await $.wait(1500)
}
await getInviteInfo();//雇佣
if (exchangeFlag) {
Expand Down
16 changes: 11 additions & 5 deletions jd_fcdyj.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const JD_API_HOST = `https://api.m.jd.com`;
//开红包查询
for (let i = 0; i < cookiesArr.length && $.needhelp; i++) {
cookie = cookiesArr[i];
$.hotFlag = false;
if (cookie) {
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
$.index = i + 1;
Expand All @@ -64,6 +65,7 @@ const JD_API_HOST = `https://api.m.jd.com`;
if (!dyjCode) {
console.log(`\n环境变量中没有检测到助力码,开始获取【京东账号${$.index}】助力码\n`)
await open()
if ($.hotFlag) continue;
await getid()
} else {
dyjStr = dyjCode.split("@")
Expand All @@ -83,10 +85,10 @@ const JD_API_HOST = `https://api.m.jd.com`;
}
if (new Date().getHours() >= 10) {
// await getAuthorShareCode()
$.authorCode.push({
"redEnvelopeId": "be8f130899eb4311b1239733a81a851751151635211683979",
"inviter": "TLkD8_PycMVws_9HtL2YLxaNNJ_CYAljNZtiKqj2jvI"
})
$.authorCode = [{
redEnvelopeId: '79b18e749d024e81b264b49d31289c2067611635301468218',
inviter:'TLkD8_PycMVws_9HtL2YLxaNNJ_CYAljNZtiKqj2jvI'
}]
if ($.authorCode && $.authorCode.length) {
for (let i = 0; i < cookiesArr.length; i++) {
cookie = cookiesArr[i];
Expand Down Expand Up @@ -167,6 +169,10 @@ function open() {
console.log(`${$.name} API请求失败,请检查网路重试`);
} else {
data = JSON.parse(data);
if (data.code === 16020) {
$.hotFlag = true
console.log(data.errMsg);
}
}
} catch (e) {
$.logErr(e, resp);
Expand All @@ -187,7 +193,7 @@ function getid() {
console.log(`${$.name} API请求失败,请检查网路重试`);
} else {
data = JSON.parse(data);
console.log(data.data.state)
// console.log(data.data.state)
if (data.data.state !== 0) {
if (data.success && data.data) {
console.log(`\n【您的redEnvelopeId】:${data.data.redEnvelopeId}`)
Expand Down
19 changes: 8 additions & 11 deletions jd_kyd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#柠檬是兄弟就砍我2
##惊喜欢乐砍 自定义变量 入口惊喜APP我的 惊喜欢乐砍
export launchid="ba3b268758521b2a48ce7ed61b82ff7a" ##你的邀请码
export first="false" ##第一次参加变量设置为true查看商品ID 填写商品ID后自动获取邀请码邀请 如果只助力 变量设置为false
export active="" ##商品ID
其他:
我还在研究怎么用....好像还不好使.推上来测试一下
export first="false"
[task_local]
#柠檬是兄弟就砍我2
0 17,21 * * * http://nm66.top/jd_kanjia2.js, tag=柠檬是兄弟就砍我2, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
Expand All @@ -19,13 +16,13 @@ const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
let cookiesArr = [],
cookie = '',
message;
const active = '';
let first = true; //第一次参加变量设置为true查看商品ID 填写商品ID后自动获取邀请码邀请 如果只助力 变量设置为false
// const active = '';
let first = false;
let launchid

if (process.env.active) {
active = process.env.active;
}
// if (process.env.active) {
// active = process.env.active;
// }

if (process.env.first) {
first = true;
Expand All @@ -42,12 +39,12 @@ if ($.isNode()) {
const JD_API_HOST = 'https://api.m.jd.com/client.action';

!(async () => {
console.debug('正在测试,别着急!!!,可能会在群内抽奖')
if (!cookiesArr[0]) {
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" });
return;
}
launchid = ['jxhlk_20211025_4df034ca018b8fa']
const link = Math.random() > 0.5 ? 'https://raw.fastgit.org/zero205/updateTeam/main/shareCodes/kyd.json' : 'https://raw.fastgit.org/shufflewzc/updateTeam/main/shareCodes/kyd.json'
launchid = await getAuthorShareCode(link) || []
if (process.env.launchid) {
launchid = process.env.launchid.split('@');
}
Expand Down
Loading

0 comments on commit 18c9a28

Please sign in to comment.