@@ -103,7 +103,7 @@ cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_script
|
||||
cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励
|
||||
|
||||
# 京东健康
|
||||
cron "3 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js,tag=京东健康
|
||||
#cron "3 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js,tag=京东健康
|
||||
# 京东赚赚
|
||||
cron "10 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚
|
||||
# 京东秒杀红包雨
|
||||
@@ -120,6 +120,6 @@ cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd
|
||||
# 金融打卡领年终奖
|
||||
# cron "10 6 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖
|
||||
# 健康抽奖机
|
||||
cron "10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机
|
||||
#cron "10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机
|
||||
# 疯狂的joy日常任务
|
||||
cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=疯狂的joy日常任务
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
"10 6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png",
|
||||
"0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_car.png",
|
||||
"10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_kd.png",
|
||||
"30 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, tag=健康抽奖机, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png",
|
||||
"10-20/5 12 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_live_redrain.png",
|
||||
"14 11 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png",
|
||||
"44 12 * * 6 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png",
|
||||
|
||||
@@ -63,8 +63,6 @@ cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_script
|
||||
cron "20 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, timeout=750, wake-system=1, tag=京东快递签到
|
||||
#京东直播(活动结束时间未知)
|
||||
cron "20 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, timeout=750, wake-system=1, tag=京东直播
|
||||
#京东健康
|
||||
cron "20 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, timeout=750, wake-system=1, tag=京东健康
|
||||
#京东赚赚
|
||||
cron "20 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, timeout=750, wake-system=1, tag=京东赚赚
|
||||
#注销京东店铺会员卡
|
||||
|
||||
@@ -21,9 +21,9 @@ cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scrip
|
||||
*/
|
||||
const $ = new Env('健康抽奖机');
|
||||
|
||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||
const notify = $.isNode() ? require('../sendNotify') : '';
|
||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||
const jdCookieNode = $.isNode() ? require('../jdCookie.js') : '';
|
||||
let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
|
||||
const randomCount = $.isNode() ? 20 : 5;
|
||||
//IOS等用户直接用NobyDa的jd cookie
|
||||
@@ -4,8 +4,7 @@
|
||||
50 23 */3 * * rm -rf /scripts/logs/*.log
|
||||
|
||||
##############短期活动##############
|
||||
# 健康抽奖机
|
||||
10 0 * * * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
|
||||
|
||||
|
||||
##############长期活动##############
|
||||
# 签到
|
||||
@@ -60,8 +59,6 @@
|
||||
36 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1
|
||||
# 十元街
|
||||
36 8,18 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1
|
||||
# 京东代属(注:限校园用户可使用)
|
||||
# 36 9 * * * node /scripts/jd_ds.js >> /scripts/logs/jd_ds.log 2>&1
|
||||
# 京东快递签到
|
||||
23 1 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1
|
||||
# 京东汽车(签到满500赛点可兑换500京豆)
|
||||
|
||||
@@ -117,7 +117,7 @@ function collectElectricity(facId = $.factoryId, help = false, master) {
|
||||
// if (help && master) {
|
||||
// url = `/dreamfactory/generator/CollectCurrentElectricity?zone=dream_factory&factoryid=${facId}&master=${master}&sceneval=2&g_login_type=1`;
|
||||
// }
|
||||
let body = `factoryid=${facId}&apptoken=&pgtimestamp=&phoneID=&doubleflag=1`;
|
||||
let body = `factoryid=${facId}&apptoken=&pgtimestamp=&phoneID=&doubleflag=1&_stk=_time,apptoken,doubleflag,factoryid,pgtimestamp,phoneID,timeStamp,zone`;
|
||||
if (help && master) {
|
||||
body += `factoryid=${facId}&master=${master}`;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lxk0301 https://github.com/lxk0301
|
||||
* @Date: 2020-08-16 18:54:16
|
||||
* @Last Modified by: lxk0301
|
||||
* @Last Modified time: 2021-1-17 18:22:37
|
||||
* @Last Modified time: 2021-1-8 18:22:37
|
||||
*/
|
||||
/*
|
||||
东东超市(活动入口:京东APP-》首页-》京东超市-》底部东东超市)
|
||||
@@ -87,8 +87,8 @@ async function jdSuperMarket() {
|
||||
await businessCircleActivity();//商圈活动
|
||||
await receiveBlueCoin();//收蓝币(小费)
|
||||
await receiveLimitProductBlueCoin();//收限时商品的蓝币
|
||||
await smtgSign();//每日签到
|
||||
await smtgBeanSign()//
|
||||
await daySign();//每日签到
|
||||
await BeanSign()//
|
||||
await doDailyTask();//做日常任务,分享,关注店铺,
|
||||
await help();//商圈助力
|
||||
//await smtgQueryPkTask();//做商品PK任务
|
||||
@@ -97,7 +97,9 @@ async function jdSuperMarket() {
|
||||
await upgrade();//升级货架和商品
|
||||
await manageProduct();
|
||||
await limitTimeProduct();
|
||||
await smtg_shopIndex();
|
||||
await smtgHome();
|
||||
await receiveUserUpgradeBlue()
|
||||
}
|
||||
function showMsg() {
|
||||
$.log(`\n${message}\n`);
|
||||
@@ -203,7 +205,7 @@ async function doDailyTask() {
|
||||
}
|
||||
|
||||
async function receiveGoldCoin() {
|
||||
$.goldCoinData = await smtgReceiveCoin(0);
|
||||
$.goldCoinData = await smtgReceiveCoin({ "type": 0 });
|
||||
if ($.goldCoinData.data.bizCode === 0) {
|
||||
console.log(`领取金币成功${$.goldCoinData.data.result.receivedGold}`)
|
||||
message += `【领取金币】${$.goldCoinData.data.result.receivedGold}个\n`;
|
||||
@@ -214,7 +216,7 @@ async function receiveGoldCoin() {
|
||||
|
||||
//领限时商品的蓝币
|
||||
async function receiveLimitProductBlueCoin() {
|
||||
const res = await smtgReceiveCoin(1);
|
||||
const res = await smtgReceiveCoin({ "type": 1 });
|
||||
console.log(`\n限时商品领蓝币结果:[${res.data.bizMsg}]\n`);
|
||||
if (res.data.bizCode === 0) {
|
||||
message += `【限时商品】获得${res.data.result.receivedBlue}个蓝币\n`;
|
||||
@@ -224,7 +226,7 @@ async function receiveLimitProductBlueCoin() {
|
||||
function receiveBlueCoin(timeout = 0) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout( ()=>{
|
||||
$.get(taskUrl('smtg_receiveCoin', { type: 2 }), async (err, resp, data) => {
|
||||
$.get(taskUrl('smtg_receiveCoin', {"type": 2, "channel": "18"}), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log('\n京小超: API查询请求失败 ‼️‼️')
|
||||
@@ -258,49 +260,37 @@ function receiveBlueCoin(timeout = 0) {
|
||||
},timeout)
|
||||
})
|
||||
}
|
||||
|
||||
async function daySign() {
|
||||
const signDataRes = await smtgSign({"shareId":"QcSH6BqSXysv48bMoRfTBz7VBqc5P6GodDUBAt54d8598XAUtNoGd4xWVuNtVVwNO1dSKcoaY3sX_13Z-b3BoSW1W7NnqD36nZiNuwrtyO-gXbjIlsOBFpgIPMhpiVYKVAaNiHmr2XOJptu14d8uW-UWJtefjG9fUGv0Io7NwAQ","channel":"4"});
|
||||
await smtgSign({"shareId":"TBj0jH-x7iMvCMGsHfc839Tfnco6UarNx1r3wZVIzTZiLdWMRrmoocTbXrUOFn0J6UIir16A2PPxF50_Eoo7PW_NQVOiM-3R16jjlT20TNPHpbHnmqZKUDaRajnseEjVb-SYi6DQqlSOioRc27919zXTEB6_llab2CW2aDok36g","channel":"4"});
|
||||
if (signDataRes && signDataRes.code === 0) {
|
||||
const signList = await smtgSignList();
|
||||
if (signList.data.bizCode === 0) {
|
||||
$.todayDay = signList.data.result.todayDay;
|
||||
}
|
||||
if (signDataRes.code === 0 && signDataRes.data.success) {
|
||||
message += `【第${$.todayDay}日签到】成功,奖励${signDataRes.data.result.rewardBlue}蓝币\n`
|
||||
} else {
|
||||
message += `【第${$.todayDay}日签到】${signDataRes.data.bizMsg}\n`
|
||||
}
|
||||
}
|
||||
}
|
||||
async function BeanSign() {
|
||||
const beanSignRes = await smtgSign({"channel": "1"});
|
||||
if (beanSignRes && beanSignRes.data['bizCode'] === 0) {
|
||||
console.log(`每天从指定入口进入游戏,可获得额外奖励:${JSON.stringify(beanSignRes)}`)
|
||||
}
|
||||
}
|
||||
//每日签到
|
||||
function smtgSign() {
|
||||
function smtgSign(body) {
|
||||
return new Promise((resolve) => {
|
||||
$.get(taskUrl('smtg_sign', {"shareId":"QcSH6BqSXysv48bMoRfTBz7VBqc5P6GodDUBAt54d8598XAUtNoGd4xWVuNtVVwNO1dSKcoaY3sX_13Z-b3BoSW1W7NnqD36nZiNuwrtyO-gXbjIlsOBFpgIPMhpiVYKVAaNiHmr2XOJptu14d8uW-UWJtefjG9fUGv0Io7NwAQ","channel":"4"}), async (err, resp, data) => {
|
||||
$.get(taskUrl('smtg_sign', body), async (err, resp, data) => {
|
||||
try {
|
||||
// console.log('ddd----ddd', data)
|
||||
if (err) {
|
||||
console.log('\n京小超: API查询请求失败 ‼️‼️')
|
||||
console.log(JSON.stringify(err));
|
||||
} else {
|
||||
data = JSON.parse(data);
|
||||
// console.log('ddd----ddd', data)
|
||||
const signList = await smtgSignList();
|
||||
if (signList.data.bizCode === 0) {
|
||||
$.todayDay = signList.data.result.todayDay;
|
||||
}
|
||||
if (data.code === 0 && data.data.success) {
|
||||
message += `【第${$.todayDay}日签到】成功,奖励${data.data.result.rewardBlue}蓝币\n`
|
||||
} else {
|
||||
message += `【第${$.todayDay}日签到】${data.data.bizMsg}\n`
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function smtgBeanSign() {
|
||||
return new Promise((resolve) => {
|
||||
$.get(taskUrl('smtg_sign',{"channel": "1"}), async (err, resp, data) => {
|
||||
try {
|
||||
// console.log('ddd----ddd', data)
|
||||
if (err) {
|
||||
console.log('\n京小超: API查询请求失败 ‼️‼️')
|
||||
console.log(JSON.stringify(err));
|
||||
} else {
|
||||
//data = JSON.parse(data);
|
||||
console.log(data)
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
@@ -710,8 +700,105 @@ async function limitTimeProduct() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//领取店铺升级的蓝币奖励
|
||||
async function receiveUserUpgradeBlue() {
|
||||
$.receiveUserUpgradeBlue = 0;
|
||||
if ($.userUpgradeBlueVos && $.userUpgradeBlueVos.length > 0) {
|
||||
for (let item of $.userUpgradeBlueVos) {
|
||||
const receiveCoin = await smtgReceiveCoin({ "id": item.id, "type": 5 })
|
||||
$.log(`\n${JSON.stringify(receiveCoin)}`)
|
||||
if (receiveCoin && receiveCoin.data['bizCode'] === 0) {
|
||||
$.receiveUserUpgradeBlue += receiveCoin.data.result['receivedBlue']
|
||||
}
|
||||
}
|
||||
$.log(`店铺升级奖励获取:${$.receiveUserUpgradeBlue}蓝币\n`)
|
||||
}
|
||||
const res = await smtgReceiveCoin({"type": 4, "channel": "18"})
|
||||
$.log(`${JSON.stringify(res)}\n`)
|
||||
if (res && res.data['bizCode'] === 0) {
|
||||
console.log(`成功领取${res.data.result['receivedTurnover']}蓝币\n`);
|
||||
}
|
||||
}
|
||||
//=============================================脚本使用到的京东API=====================================
|
||||
|
||||
//===新版本
|
||||
|
||||
//查询有哪些货架
|
||||
function smtg_shopIndex() {
|
||||
return new Promise((resolve) => {
|
||||
$.get(taskUrl('smtg_shopIndex', { "channel": 1 }), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log('\n京小超: API查询请求失败 ‼️‼️')
|
||||
console.log(JSON.stringify(err));
|
||||
} else {
|
||||
data = JSON.parse(data);
|
||||
if (data && data.data['bizCode'] === 0) {
|
||||
const { shopId, shelfList } = data.data['result'];
|
||||
if (shelfList && shelfList.length > 0) {
|
||||
for (let item of shelfList) {
|
||||
//status: 2可解锁,1可升级,-1不可解锁
|
||||
if (item['status'] === 2) {
|
||||
$.log(`${item['name']}可解锁\n`)
|
||||
await smtg_shelfUnlock({ shopId, "shelfId": item['id'], "channel": 1 })
|
||||
} else if (item['status'] === 1) {
|
||||
$.log(`${item['name']}可升级\n`)
|
||||
await smtg_shelfUpgrade({ shopId, "shelfId": item['id'], "channel": 1, "targetLevel": item['level'] + 1 });
|
||||
} else if (item['status'] === -1) {
|
||||
$.log(`[${item['name']}] 未解锁`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//解锁店铺
|
||||
function smtg_shelfUnlock(body) {
|
||||
return new Promise((resolve) => {
|
||||
$.get(taskUrl('smtg_shelfUnlock', body), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log('\n京小超: API查询请求失败 ‼️‼️')
|
||||
console.log(JSON.stringify(err));
|
||||
} else {
|
||||
$.log(`解锁店铺结果:${data}\n`)
|
||||
data = JSON.parse(data);
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function smtg_shelfUpgrade(body) {
|
||||
return new Promise((resolve) => {
|
||||
$.get(taskUrl('smtg_shelfUpgrade', body), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log('\n京小超: API查询请求失败 ‼️‼️')
|
||||
console.log(JSON.stringify(err));
|
||||
} else {
|
||||
$.log(`店铺升级结果:${data}\n`)
|
||||
data = JSON.parse(data);
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//新版东东超市
|
||||
function updatePkActivityId(url = 'https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_updateTeam.json') {
|
||||
return new Promise(resolve => {
|
||||
//https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateTeam.json
|
||||
@@ -823,7 +910,7 @@ function smtgQueryShopTask() {
|
||||
}
|
||||
function smtgSignList() {
|
||||
return new Promise((resolve) => {
|
||||
$.get(taskUrl('smtg_signList'), (err, resp, data) => {
|
||||
$.get(taskUrl('smtg_signList', { "channel": "18" }), (err, resp, data) => {
|
||||
try {
|
||||
// console.log('ddd----ddd', data)
|
||||
if (err) {
|
||||
@@ -842,7 +929,7 @@ function smtgSignList() {
|
||||
}
|
||||
function smtgHome() {
|
||||
return new Promise((resolve) => {
|
||||
$.get(taskUrl('smtg_home'), (err, resp, data) => {
|
||||
$.get(taskUrl('smtg_newHome', { "channel": "18" }), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log('\n京小超: API查询请求失败 ‼️‼️')
|
||||
@@ -851,10 +938,10 @@ function smtgHome() {
|
||||
data = JSON.parse(data);
|
||||
if (data.code === 0 && data.data.success) {
|
||||
const { result } = data.data;
|
||||
const { shopName, totalGold, totalBlue } = result;
|
||||
$.circleStatus = result.circleStatus;
|
||||
const { shopName, totalBlue, userUpgradeBlueVos, turnoverProgress } = result;
|
||||
$.userUpgradeBlueVos = userUpgradeBlueVos;
|
||||
$.turnoverProgress = turnoverProgress;//是否可解锁
|
||||
subTitle = shopName;
|
||||
message += `【总金币】${totalGold}个\n`;
|
||||
message += `【总蓝币】${totalBlue}个\n`;
|
||||
}
|
||||
}
|
||||
@@ -929,11 +1016,8 @@ function smtgDoAssistPkTask(code) {
|
||||
})
|
||||
})
|
||||
}
|
||||
function smtgReceiveCoin(type) {
|
||||
function smtgReceiveCoin(body) {
|
||||
return new Promise((resolve) => {
|
||||
const body = {
|
||||
"type": type
|
||||
}
|
||||
$.get(taskUrl('smtg_receiveCoin', body), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
|
||||
@@ -46,12 +46,12 @@ inputs:
|
||||
cronExpression: "0 0 0-16/8,20 * * * *"
|
||||
enable: true
|
||||
argument: jd_joy_reward&jd_joy_steal&jd_necklace&jd_live
|
||||
- timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #注销京东会员卡 #京东抽奖机 #东东小窝 #健康抽奖机
|
||||
- timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #注销京东会员卡 #京东抽奖机 #东东小窝
|
||||
parameters:
|
||||
name: redPacket_shop_unsubscribe_unbind_lotteryMachine_small_home_health
|
||||
name: redPacket_shop_unsubscribe_unbind_lotteryMachine_small_home
|
||||
cronExpression: "0 10 0 * * * *"
|
||||
enable: true
|
||||
argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_unbind&jd_lotteryMachine&jd_small_home&jd_health
|
||||
argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_unbind&jd_lotteryMachine&jd_small_home
|
||||
- timer: # 京东天天加速# 天天提鹅
|
||||
parameters:
|
||||
name: jd_speed_jd_daily_egg
|
||||
|
||||
Reference in New Issue
Block a user