update
This commit is contained in:
@@ -41,8 +41,8 @@ if ($.isNode()) {
|
|||||||
const JD_API_HOST = 'https://api.m.jd.com/';
|
const JD_API_HOST = 'https://api.m.jd.com/';
|
||||||
!(async () => {
|
!(async () => {
|
||||||
$.newShareCodes = []
|
$.newShareCodes = []
|
||||||
// await getAuthorShareCode();
|
await getAuthorShareCode();
|
||||||
// await getAuthorShareCode2();
|
await getAuthorShareCode2();
|
||||||
if (!cookiesArr[0]) {
|
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"});
|
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});
|
||||||
return;
|
return;
|
||||||
@@ -68,34 +68,34 @@ const JD_API_HOST = 'https://api.m.jd.com/';
|
|||||||
await jdBeanHome();
|
await jdBeanHome();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for (let i = 0; i < cookiesArr.length; i++) {
|
for (let i = 0; i < cookiesArr.length; i++) {
|
||||||
// if (cookiesArr[i]) {
|
if (cookiesArr[i]) {
|
||||||
// $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
|
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
|
||||||
// console.log(`${$.UserName}去帮助下一个人`)
|
console.log(`${$.UserName}去帮助下一个人`)
|
||||||
// cookie = cookiesArr[i];
|
cookie = cookiesArr[i];
|
||||||
// if ($.newShareCodes.length > 1) {
|
if ($.newShareCodes.length > 1) {
|
||||||
// let code = $.newShareCodes[(i + 1) % $.newShareCodes.length]
|
let code = $.newShareCodes[(i + 1) % $.newShareCodes.length]
|
||||||
// await help(code[0], code[1])
|
await help(code[0], code[1])
|
||||||
// }
|
}
|
||||||
// if (helpAuthor && $.authorCode) {
|
if (helpAuthor && $.authorCode) {
|
||||||
// console.log(`去帮助作者`)
|
console.log(`去帮助作者`)
|
||||||
// const helpRes = await help($.authorCode[0], $.authorCode[1])
|
const helpRes = await help($.authorCode[0], $.authorCode[1])
|
||||||
// if (helpRes && helpRes.data.respCode === 'SG209') {
|
if (helpRes && helpRes.data.respCode === 'SG209') {
|
||||||
// console.log(`助力次数已耗尽,跳出助力`)
|
console.log(`助力次数已耗尽,跳出助力`)
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// if (helpAuthor && $.authorCode2) {
|
if (helpAuthor && $.authorCode2) {
|
||||||
// for (let code of $.authorCode2) {
|
for (let code of $.authorCode2) {
|
||||||
// const helpRes = await help(code.shareCode, code.groupCode);
|
const helpRes = await help(code.shareCode, code.groupCode);
|
||||||
// if (helpRes && helpRes.data.respCode === 'SG209') {
|
if (helpRes && helpRes.data.respCode === 'SG209') {
|
||||||
// console.log(`助力次数已耗尽,跳出助力`)
|
console.log(`助力次数已耗尽,跳出助力`)
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
})()
|
})()
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
|
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user