Skip to content

Commit

Permalink
优化一波
Browse files Browse the repository at this point in the history
  • Loading branch information
wide19 committed Nov 16, 2021
1 parent b10308a commit 35ac147
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion jd_dddh.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/**
东东世界兑换
cron 2 0 * * * jd_dddh.js
cron 0 0 * * * jd_dddh.js
TG频道:https://t.me/sheeplost
*/
const $ = new Env("东东世界兑换");
Expand Down
12 changes: 6 additions & 6 deletions jd_jdzz.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ async function helpFriends() {
function readShareCode() {
console.log(`开始`)
return new Promise(async resolve => {
$.get({url: `https://code.chiang.fun/api/v1/jd/jdzz/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => {
$.get({url: `https://cdn.jsdelivr.net/gh/6dylan6/updateTeam@main/shareCodes/jd_zz.json`, 'timeout': 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
Expand All @@ -246,7 +246,7 @@ function readShareCode() {
//格式化助力码
function shareCodesFormat() {
return new Promise(async resolve => {
// console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`)
console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`)
$.newShareCodes = [];
if ($.shareCodesArr[$.index - 1]) {
$.newShareCodes = $.shareCodesArr[$.index - 1].split('@');
Expand All @@ -255,10 +255,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_speed_sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let llAPIError = false
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" });
return;
}
$.canhelp = true;
$.canhelp = false;
if ($.isNode()) {
if (process.env.HELP_YQYL && process.env.HELP_YQYL === 'false')
$.canhelp = false
Expand Down

0 comments on commit 35ac147

Please sign in to comment.