update
This commit is contained in:
@@ -370,7 +370,7 @@ function taskUrl(functionId, body = {}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAuthorShareCode(url = "https://gitee.com/shylocks/updateTeam/raw/main/jd_cash.json") {
|
function getAuthorShareCode(url = "http://qr6pzoy01.hn-bkt.clouddn.com/jd_cash.json") {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
$.get({url, headers:{
|
$.get({url, headers:{
|
||||||
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
|
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
|
||||||
|
|||||||
@@ -966,7 +966,7 @@ async function tuanActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function joinLeaderTuan() {
|
async function joinLeaderTuan() {
|
||||||
let res = await updateTuanIdsCDN(), res2 = await updateTuanIdsCDN("https://gitee.com/shylocks/updateTeam/raw/main/jd_updateFactoryTuanId.json")
|
let res = await updateTuanIdsCDN(), res2 = await updateTuanIdsCDN("http://qr6pzoy01.hn-bkt.clouddn.com/factory.json")
|
||||||
$.authorTuanIds = [...(res && res.tuanIds || []),...(res2 && res2.tuanIds || [])]
|
$.authorTuanIds = [...(res && res.tuanIds || []),...(res2 && res2.tuanIds || [])]
|
||||||
if ($.authorTuanIds && $.authorTuanIds.length) {
|
if ($.authorTuanIds && $.authorTuanIds.length) {
|
||||||
console.log(`\n参加作者的团`);
|
console.log(`\n参加作者的团`);
|
||||||
@@ -1188,7 +1188,7 @@ function tuanAward(activeId, tuanId, isTuanLeader = true) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTuanIdsCDN(url = 'https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json') {
|
function updateTuanIdsCDN(url = 'https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_updateFactoryTuanId.json') {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url,
|
$.get({url,
|
||||||
timeout: 200000,
|
timeout: 200000,
|
||||||
@@ -1206,11 +1206,11 @@ function updateTuanIdsCDN(url = 'https://cdn.jsdelivr.net/gh/gitupdate/updateTea
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
$.logErr(e, resp)
|
$.logErr(e, resp)
|
||||||
} finally {
|
} finally {
|
||||||
resolve(data || []);
|
resolve(data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
await $.wait(20000)
|
await $.wait(20000)
|
||||||
resolve([]);
|
resolve();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1321,12 +1321,20 @@ function shareCodesFormat() {
|
|||||||
}
|
}
|
||||||
function requireConfig() {
|
function requireConfig() {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json');
|
await updateTuanIdsCDN();
|
||||||
if ($.tuanConfigs && $.tuanConfigs['tuanActiveId']) {
|
if ($.tuanConfigs && $.tuanConfigs['tuanActiveId']) {
|
||||||
tuanActiveId = $.tuanConfigs['tuanActiveId'];
|
tuanActiveId = $.tuanConfigs['tuanActiveId'];
|
||||||
console.log(`拼团活动ID: 获取成功 ${tuanActiveId}`)
|
console.log(`拼团活动ID: 获取成功 ${tuanActiveId}`)
|
||||||
} else {
|
} else {
|
||||||
console.log(`拼团活动ID:获取失败`)
|
if (!$.tuanConfigs) {
|
||||||
|
await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json');
|
||||||
|
if ($.tuanConfigs && $.tuanConfigs['tuanActiveId']) {
|
||||||
|
tuanActiveId = $.tuanConfigs['tuanActiveId'];
|
||||||
|
console.log(`拼团活动ID: 获取成功 ${tuanActiveId}`)
|
||||||
|
} else {
|
||||||
|
console.log(`拼团活动ID:获取失败,将采取脚本内置活动ID`)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
console.log(`开始获取${$.name}配置文件\n`);
|
console.log(`开始获取${$.name}配置文件\n`);
|
||||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() *
|
|||||||
!(async () => {
|
!(async () => {
|
||||||
$.tuanList = []
|
$.tuanList = []
|
||||||
await requireConfig();
|
await requireConfig();
|
||||||
// if (helpAuthor) await getAuthorShareCode('https://gitee.com/shylocks/updateTeam/raw/main/jd_zz.json');
|
if (helpAuthor) await getAuthorShareCode('http://qr6pzoy01.hn-bkt.clouddn.com/jd_zz.json');
|
||||||
if (helpAuthor) await getAuthorShareCode('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_zz.json');
|
if (helpAuthor) await getAuthorShareCode('https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_zz.json');
|
||||||
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;
|
||||||
@@ -81,6 +81,7 @@ let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() *
|
|||||||
await notify.sendNotify($.name, allMessage);
|
await notify.sendNotify($.name, allMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(`开始账号内部互助 赚京豆-瓜分京豆 活动(优先内部账号互助,如有剩余则给作者lxk0301助力)`)
|
||||||
for (let i = 0; i < cookiesArr.length; i++) {
|
for (let i = 0; i < cookiesArr.length; i++) {
|
||||||
$.canHelp = true
|
$.canHelp = true
|
||||||
if (cookiesArr[i]) {
|
if (cookiesArr[i]) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user