mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
update
This commit is contained in:
parent
b75f2b4be2
commit
5063122644
39
jd_wish.js
39
jd_wish.js
@ -1,8 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
众筹许愿池
|
众筹许愿池
|
||||||
|
活动入口:京东-京东众筹-众筹许愿池
|
||||||
40 5,8 * * * jd_wish.js
|
15 12,19 * * * jd_wish.js
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const $ = new Env('众筹许愿池');
|
const $ = new Env('众筹许愿池');
|
||||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||||
@ -12,8 +11,8 @@ let message = '', allMessage = '';
|
|||||||
//IOS等用户直接用NobyDa的jd cookie
|
//IOS等用户直接用NobyDa的jd cookie
|
||||||
let cookiesArr = [], cookie = '';
|
let cookiesArr = [], cookie = '';
|
||||||
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
||||||
let appIdArr = ["1EFVXyw"];
|
let appIdArr = ["1FFVWyqyD"];
|
||||||
let appNameArr = ["年终奖补贴"];
|
let appNameArr = ["踏海寻村"];
|
||||||
let appId, appName;
|
let appId, appName;
|
||||||
$.shareCode = [];
|
$.shareCode = [];
|
||||||
if ($.isNode()) {
|
if ($.isNode()) {
|
||||||
@ -41,7 +40,7 @@ if ($.isNode()) {
|
|||||||
$.isLogin = true;
|
$.isLogin = true;
|
||||||
$.nickName = '';
|
$.nickName = '';
|
||||||
message = '';
|
message = '';
|
||||||
//await TotalBean();
|
await TotalBean();
|
||||||
console.log(`\n*******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
|
console.log(`\n*******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
|
||||||
if (!$.isLogin) {
|
if (!$.isLogin) {
|
||||||
$.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});
|
$.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});
|
||||||
@ -51,7 +50,6 @@ if ($.isNode()) {
|
|||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let j = 0; j < appIdArr.length; j++) {
|
for (let j = 0; j < appIdArr.length; j++) {
|
||||||
appId = appIdArr[j]
|
appId = appIdArr[j]
|
||||||
appName = appNameArr[j]
|
appName = appNameArr[j]
|
||||||
@ -65,7 +63,12 @@ if ($.isNode()) {
|
|||||||
if ($.isNode()) await notify.sendNotify($.name, allMessage);
|
if ($.isNode()) await notify.sendNotify($.name, allMessage);
|
||||||
$.msg($.name, '', allMessage)
|
$.msg($.name, '', allMessage)
|
||||||
}
|
}
|
||||||
let res = await getAuthorShareCode('')
|
let res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/6dylan6/updateTeam@main/shareCodes/wish.json')
|
||||||
|
if (!res) {
|
||||||
|
$.http.get({url: 'https://cdn.jsdelivr.net/gh/6dylan6/updateTeam@main/shareCodes/wish.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e));
|
||||||
|
await $.wait(1000)
|
||||||
|
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/6dylan6/updateTeam@main/shareCodes/wish.json')
|
||||||
|
}
|
||||||
$.shareCode = [...$.shareCode, ...(res || [])]
|
$.shareCode = [...$.shareCode, ...(res || [])]
|
||||||
for (let i = 0; i < cookiesArr.length; i++) {
|
for (let i = 0; i < cookiesArr.length; i++) {
|
||||||
if (cookiesArr[i]) {
|
if (cookiesArr[i]) {
|
||||||
@ -128,8 +131,9 @@ async function jd_wish() {
|
|||||||
console.log('抽太多次了,下次再继续吧!');
|
console.log('抽太多次了,下次再继续吧!');
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
await $.wait(3000)
|
await $.wait(2000)
|
||||||
}
|
}
|
||||||
|
if (message) allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n${appName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$.logErr(e)
|
$.logErr(e)
|
||||||
@ -138,7 +142,6 @@ async function jd_wish() {
|
|||||||
|
|
||||||
async function healthyDay_getHomeData(type = true) {
|
async function healthyDay_getHomeData(type = true) {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
// console.log(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }));
|
|
||||||
$.post(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }), async (err, resp, data) => {
|
$.post(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }), async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -156,7 +159,7 @@ async function healthyDay_getHomeData(type = true) {
|
|||||||
if (vo.taskType === 13 || vo.taskType === 12) {
|
if (vo.taskType === 13 || vo.taskType === 12) {
|
||||||
console.log(`点击热区`)
|
console.log(`点击热区`)
|
||||||
await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType)
|
await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType)
|
||||||
await $.wait(1500)
|
await $.wait(1000)
|
||||||
} else {
|
} else {
|
||||||
console.log(`【${vo.taskName}】已完成\n`)
|
console.log(`【${vo.taskName}】已完成\n`)
|
||||||
}
|
}
|
||||||
@ -168,14 +171,14 @@ async function healthyDay_getHomeData(type = true) {
|
|||||||
if (vo.taskType === 13 || vo.taskType === 12) {
|
if (vo.taskType === 13 || vo.taskType === 12) {
|
||||||
console.log(`签到`)
|
console.log(`签到`)
|
||||||
await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType)
|
await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType)
|
||||||
await $.wait(1500)
|
await $.wait(1000)
|
||||||
} else if (vo.taskType === 1) {
|
} else if (vo.taskType === 1) {
|
||||||
for (let key of Object.keys(vo.followShopVo)) {
|
for (let key of Object.keys(vo.followShopVo)) {
|
||||||
let followShopVo = vo.followShopVo[key]
|
let followShopVo = vo.followShopVo[key]
|
||||||
if (followShopVo.status !== 2) {
|
if (followShopVo.status !== 2) {
|
||||||
console.log(`【${followShopVo.shopName}】${vo.subTitleName}`)
|
console.log(`【${followShopVo.shopName}】${vo.subTitleName}`)
|
||||||
await harmony_collectScore({ "appId": appId, "taskToken": followShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
await harmony_collectScore({ "appId": appId, "taskToken": followShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
||||||
await $.wait(1500)
|
await $.wait(1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (vo.taskType === 5) {
|
} else if (vo.taskType === 5) {
|
||||||
@ -184,7 +187,7 @@ async function healthyDay_getHomeData(type = true) {
|
|||||||
if (browseShopVo.status !== 2) {
|
if (browseShopVo.status !== 2) {
|
||||||
console.log(`【${browseShopVo.skuName}】${vo.subTitleName}`)
|
console.log(`【${browseShopVo.skuName}】${vo.subTitleName}`)
|
||||||
await harmony_collectScore({ "appId": appId, "taskToken": browseShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
await harmony_collectScore({ "appId": appId, "taskToken": browseShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
||||||
await $.wait(1500)
|
await $.wait(1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (vo.taskType === 15) {
|
} else if (vo.taskType === 15) {
|
||||||
@ -193,7 +196,7 @@ async function healthyDay_getHomeData(type = true) {
|
|||||||
if (productInfoVos.status !== 2) {
|
if (productInfoVos.status !== 2) {
|
||||||
console.log(`【${productInfoVos.skuName}】${vo.subTitleName}`)
|
console.log(`【${productInfoVos.skuName}】${vo.subTitleName}`)
|
||||||
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
||||||
await $.wait(1500)
|
await $.wait(1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (vo.taskType === 3) {
|
} else if (vo.taskType === 3) {
|
||||||
@ -202,7 +205,7 @@ async function healthyDay_getHomeData(type = true) {
|
|||||||
if (shoppingActivityVos.status !== 2) {
|
if (shoppingActivityVos.status !== 2) {
|
||||||
console.log(`【${vo.subTitleName}】`)
|
console.log(`【${vo.subTitleName}】`)
|
||||||
await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
||||||
await $.wait(1500)
|
await $.wait(1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (vo.taskType === 8) {
|
} else if (vo.taskType === 8) {
|
||||||
@ -213,7 +216,7 @@ async function healthyDay_getHomeData(type = true) {
|
|||||||
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "1" })
|
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "1" })
|
||||||
await $.wait(vo.waitDuration * 1000)
|
await $.wait(vo.waitDuration * 1000)
|
||||||
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
||||||
await $.wait(1500)
|
await $.wait(1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (vo.taskType === 27 && vo.taskId === 18) {
|
} else if (vo.taskType === 27 && vo.taskId === 18) {
|
||||||
@ -229,7 +232,7 @@ async function healthyDay_getHomeData(type = true) {
|
|||||||
await $.wait(vo.waitDuration * 1000)
|
await $.wait(vo.waitDuration * 1000)
|
||||||
}
|
}
|
||||||
await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
|
||||||
await $.wait(1500)
|
await $.wait(1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (vo.taskType === 14) {
|
} else if (vo.taskType === 14) {
|
||||||
|
@ -21,7 +21,7 @@ const querystring = require('querystring');
|
|||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
const $ = new Env();
|
const $ = new Env();
|
||||||
const timeout = 15000; //超时时间(单位毫秒)
|
const timeout = 15000; //超时时间(单位毫秒)
|
||||||
console.log("加载sendNotify,当前版本: 20230224");
|
console.log("加载sendNotify,当前版本: 20230309");
|
||||||
// =======================================go-cqhttp通知设置区域===========================================
|
// =======================================go-cqhttp通知设置区域===========================================
|
||||||
//gobot_url 填写请求地址http://127.0.0.1/send_private_msg
|
//gobot_url 填写请求地址http://127.0.0.1/send_private_msg
|
||||||
//gobot_token 填写在go-cqhttp文件设置的访问密钥
|
//gobot_token 填写在go-cqhttp文件设置的访问密钥
|
||||||
@ -1283,8 +1283,7 @@ function tgBotNotify(text, desp) {
|
|||||||
json: {
|
json: {
|
||||||
chat_id: `${TG_USER_ID}`,
|
chat_id: `${TG_USER_ID}`,
|
||||||
text: `${text}\n\n${desp}`,
|
text: `${text}\n\n${desp}`,
|
||||||
disable_web_page_preview:true,
|
disable_web_page_preview:true
|
||||||
parse_mode:"html",
|
|
||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
Loading…
Reference in New Issue
Block a user