mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
1
This commit is contained in:
parent
847f52aca2
commit
54788812bb
70
jd_beauty.js
70
jd_beauty.js
@ -8,7 +8,6 @@ https://raw.githubusercontent.com/aTenb/jdOpenSharePicker/master/jd_beautyStudy.
|
|||||||
*/
|
*/
|
||||||
const $ = new Env('美丽研究院');
|
const $ = new Env('美丽研究院');
|
||||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||||
console.log('已废弃,能不能用随缘!!!')
|
|
||||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||||
const WebSocket = require('ws');
|
const WebSocket = require('ws');
|
||||||
const UA = process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)
|
const UA = process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)
|
||||||
@ -50,7 +49,7 @@ const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
|||||||
$.nickName = '';
|
$.nickName = '';
|
||||||
message = '';
|
message = '';
|
||||||
$.token = '';
|
$.token = '';
|
||||||
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/`, {"open-url": "https://bean.m.jd.com/"});
|
$.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
|
||||||
@ -61,7 +60,9 @@ const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
await accountCheck();
|
await accountCheck();
|
||||||
await $.wait(10000)
|
while (!$.hasDone) {
|
||||||
|
await $.wait(3000)
|
||||||
|
}
|
||||||
if ($.accountCheck) {
|
if ($.accountCheck) {
|
||||||
await jdBeauty();
|
await jdBeauty();
|
||||||
}
|
}
|
||||||
@ -100,9 +101,9 @@ async function accountCheck() {
|
|||||||
client.onopen = async () => {
|
client.onopen = async () => {
|
||||||
console.log(`美容研究院服务器连接成功`);
|
console.log(`美容研究院服务器连接成功`);
|
||||||
client.send('{"msg":{"type":"action","args":{"source":1},"action":"_init_"}}');
|
client.send('{"msg":{"type":"action","args":{"source":1},"action":"_init_"}}');
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_user"}}`);
|
client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_user"}}`);
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
};
|
};
|
||||||
client.onmessage = async function (e) {
|
client.onmessage = async function (e) {
|
||||||
if (e.data !== 'pong' && e.data && safeGet(e.data)) {
|
if (e.data !== 'pong' && e.data && safeGet(e.data)) {
|
||||||
@ -162,18 +163,24 @@ async function mr() {
|
|||||||
await $.wait(10000);
|
await $.wait(10000);
|
||||||
}
|
}
|
||||||
console.log(`\n========生产任务相关========\n`)
|
console.log(`\n========生产任务相关========\n`)
|
||||||
|
for (let help of helpInfo) {
|
||||||
|
client.send(help);
|
||||||
|
}
|
||||||
|
await $.wait(3000)
|
||||||
client.send(`{"msg":{"type":"action","args":{},"action":"get_produce_material"}}`)
|
client.send(`{"msg":{"type":"action","args":{},"action":"get_produce_material"}}`)
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
// 获得正在生产的商品信息
|
// 获得正在生产的商品信息
|
||||||
client.send('{"msg":{"type":"action","args":{},"action":"product_producing"}}')
|
client.send('{"msg":{"type":"action","args":{},"action":"product_producing"}}')
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
|
// 获得库存
|
||||||
|
client.send(`{"msg":{"type":"action","args":{},"action":"get_package"}}`)
|
||||||
// 获得可生成的商品列表
|
// 获得可生成的商品列表
|
||||||
client.send(`{"msg":{"type":"action","args":{"page":1,"num":10},"action":"product_lists"}}`)
|
client.send(`{"msg":{"type":"action","args":{"page":1,"num":10},"action":"product_lists"}}`)
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
// 获得原料生产列表
|
// 获得原料生产列表
|
||||||
for (let pos of positionList) {
|
for (let pos of positionList) {
|
||||||
client.send(`{"msg":{"type":"action","args":{"position":"${pos}"},"action":"produce_position_info_v2"}}`)
|
client.send(`{"msg":{"type":"action","args":{"position":"${pos}"},"action":"produce_position_info_v2"}}`)
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
}
|
}
|
||||||
console.log(`\n========日常任务相关========`)
|
console.log(`\n========日常任务相关========`)
|
||||||
client.send(`{"msg":{"type":"action","args":{},"action":"check_up"}}`)
|
client.send(`{"msg":{"type":"action","args":{},"action":"check_up"}}`)
|
||||||
@ -187,7 +194,7 @@ async function mr() {
|
|||||||
await $.wait(50000);
|
await $.wait(50000);
|
||||||
//最后做时间最久的日常任务
|
//最后做时间最久的日常任务
|
||||||
client.send(`{"msg":{"type":"action","args":{},"action":"shop_products"}}`)
|
client.send(`{"msg":{"type":"action","args":{},"action":"shop_products"}}`)
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
client.onclose = () => {
|
client.onclose = () => {
|
||||||
@ -196,7 +203,10 @@ async function mr() {
|
|||||||
$.init = true;
|
$.init = true;
|
||||||
$.hasDone = true;
|
$.hasDone = true;
|
||||||
for (let i = 0; i < $.pos.length && i < $.tokens.length; ++i) {
|
for (let i = 0; i < $.pos.length && i < $.tokens.length; ++i) {
|
||||||
$.helpInfo.push(`{"msg":{"type":"action","args":{"inviter_id":"${$.userInfo.id}","position":"${$.pos[i]}","token":"${$.tokens[i]}"},"action":"employee"}}`)
|
client.send(`{"msg":{"type":"action","args":{"inviter_id":"${$.userInfo.id}"},"action":"employee_get_user"}}`);
|
||||||
|
$.helpInfo.push(`{"msg":{"type":"action","args":{"inviter_id":"${$.userInfo.id}","position":"${$.pos[i]}","token":"${$.tokens[i]}"},"action":"employee_v2"}}`)
|
||||||
|
client.send(`{"msg":{"type":"action","args":{"inviter_id":"${$.userInfo.id}","position":"${$.pos[i]}"},"action":"employee_speed_v2"}}`);
|
||||||
|
client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":3,"channel":2,"source_app":2}}}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
client.onmessage = async function (e) {
|
client.onmessage = async function (e) {
|
||||||
@ -211,9 +221,9 @@ async function mr() {
|
|||||||
// 去签到
|
// 去签到
|
||||||
console.log(`去做签到任务`)
|
console.log(`去做签到任务`)
|
||||||
client.send(`{"msg":{"type":"action","args":{},"action":"sign_in"}}`)
|
client.send(`{"msg":{"type":"action","args":{},"action":"sign_in"}}`)
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":1,"channel":2,"source_app":2}}}`)
|
client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":1,"channel":2,"source_app":2}}}`)
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case "get_user":
|
case "get_user":
|
||||||
@ -223,7 +233,7 @@ async function mr() {
|
|||||||
console.log(`去做新手任务`)
|
console.log(`去做新手任务`)
|
||||||
for (let i = $.userInfo.step; i < 15; ++i) {
|
for (let i = $.userInfo.step; i < 15; ++i) {
|
||||||
client.send(`{"msg":{"type":"action","args":{},"action":"newcomer_update"}}`)
|
client.send(`{"msg":{"type":"action","args":{},"action":"newcomer_update"}}`)
|
||||||
await $.wait(20000);
|
await $.wait(10000);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
$.init = true;
|
$.init = true;
|
||||||
@ -276,11 +286,14 @@ async function mr() {
|
|||||||
}
|
}
|
||||||
await $.wait(10000);
|
await $.wait(10000);
|
||||||
}
|
}
|
||||||
for (let i = $.taskState.meetingplace_view; i < $.taskState.mettingplace_count; ++i) {
|
if ($.taskState.meetingplace_view.length <= vo.data.meetingplaces.length) {
|
||||||
console.log(`去做第${i + 1}次浏览会场任务`)
|
for (let vc of vo.data.meetingplaces) {
|
||||||
client.send(`{"msg":{"type":"action","args":{"source":1},"action":"meetingplace_view"}}`)
|
console.log(`去做第${vc.name}浏览会场任务`)
|
||||||
await $.wait(10000);
|
client.send(`{"msg":{"type":"action","args":{"source":1,"meetingplace_id":${vc.id}},"action":"meetingplace_view"}}`)
|
||||||
|
await $.wait(2500)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.taskState.today_answered === 0) {
|
if ($.taskState.today_answered === 0) {
|
||||||
console.log(`去做每日问答任务`)
|
console.log(`去做每日问答任务`)
|
||||||
client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_question"}}`)
|
client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_question"}}`)
|
||||||
@ -426,6 +439,7 @@ async function mr() {
|
|||||||
console.log(`【${product.name}】可生产份数大于0,去生产`)
|
console.log(`【${product.name}】可生产份数大于0,去生产`)
|
||||||
//product_produce 产品研发里的生产
|
//product_produce 产品研发里的生产
|
||||||
client.send(`{"msg":{"type":"action","args":{"product_id":${product.id},"amount":${num}},"action":"product_produce"}}`)
|
client.send(`{"msg":{"type":"action","args":{"product_id":${product.id},"amount":${num}},"action":"product_produce"}}`)
|
||||||
|
client.send(`{"msg":{"type":"action","args":{"product_id":${product.id},"amount":${num}},"action":"once_completion"}}`)
|
||||||
await $.wait(10000);
|
await $.wait(10000);
|
||||||
} else {
|
} else {
|
||||||
console.log(msg)
|
console.log(msg)
|
||||||
@ -521,15 +535,15 @@ async function mr() {
|
|||||||
case "get_produce_material":
|
case "get_produce_material":
|
||||||
$.material = vo.data
|
$.material = vo.data
|
||||||
break
|
break
|
||||||
case "to_employee":
|
//case "to_employee":
|
||||||
console.log(`雇佣助力码【${oc(() => vo.data.token)}】`)
|
// console.log(`雇佣助力码【${oc(() => vo.data.token)}】`)
|
||||||
if(oc(() => vo.data.token)){
|
// if(oc(() => vo.data.token)){
|
||||||
$.tokens.push(vo.data.token)
|
// $.tokens.push(vo.data.token)
|
||||||
}else{
|
// }else{
|
||||||
console.log(`not exist:${oc(() => vo.data)}`)
|
// console.log(`not exist:${oc(() => vo.data)}`)
|
||||||
}
|
// }
|
||||||
break
|
// break
|
||||||
case "employee":
|
case "employee_v2":
|
||||||
console.log(`${vo.msg}`)
|
console.log(`${vo.msg}`)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -620,7 +634,7 @@ function getToken() {
|
|||||||
'user-agent': UA,
|
'user-agent': UA,
|
||||||
'Referer': 'https://xinruimz-isv.isvjcloud.com/logined_jd/',
|
'Referer': 'https://xinruimz-isv.isvjcloud.com/logined_jd/',
|
||||||
'Authorization': 'Bearer undefined',
|
'Authorization': 'Bearer undefined',
|
||||||
'Cookie': `IsvToken=${$.isvToken};`
|
'Cookie': `IsvToken=${$.token2};`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
File diff suppressed because one or more lines are too long
489
jd_lzdz.js
Normal file
489
jd_lzdz.js
Normal file
File diff suppressed because one or more lines are too long
547
jd_lzdz1_customized2.js
Normal file
547
jd_lzdz1_customized2.js
Normal file
File diff suppressed because one or more lines are too long
545
jd_lzdz1_customized28.js
Normal file
545
jd_lzdz1_customized28.js
Normal file
File diff suppressed because one or more lines are too long
541
jd_lzdz1_customized2a.js
Normal file
541
jd_lzdz1_customized2a.js
Normal file
File diff suppressed because one or more lines are too long
547
jd_lzdz1_customizeds.js
Normal file
547
jd_lzdz1_customizeds.js
Normal file
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
|||||||
支付一元才能参与打卡,填写环境变量morningScPins给指定CK打卡
|
支付一元才能参与打卡,填写环境变量morningScPins给指定CK打卡
|
||||||
15 6,7 * * * jd_morningSc.js
|
15 6,7 * * * jd_morningSc.js
|
||||||
*/
|
*/
|
||||||
const $ = new Env("生鲜早起打卡")
|
const $ = new Env("早起生鲜打卡")
|
||||||
const ua = `jdltapp;iPhone;3.1.0;${Math.ceil(Math.random()*4+10)}.${Math.ceil(Math.random()*4)};${randomString(40)}`
|
const ua = `jdltapp;iPhone;3.1.0;${Math.ceil(Math.random()*4+10)}.${Math.ceil(Math.random()*4)};${randomString(40)}`
|
||||||
let cookiesArr = []
|
let cookiesArr = []
|
||||||
var pins = process.env.morningScPins ?? ""
|
var pins = process.env.morningScPins ?? ""
|
||||||
@ -61,7 +61,7 @@ let cookie = '';
|
|||||||
}
|
}
|
||||||
data = await clockIn()
|
data = await clockIn()
|
||||||
if (data?.head?.code == 200) {
|
if (data?.head?.code == 200) {
|
||||||
notify.sendNotify(`早起赢现金打卡成功,记得参与明天的打卡活动哦`,'');
|
notify.sendNotify(`早起赢现金打卡成功,记得参与明天的打卡活动哦`);
|
||||||
} else {
|
} else {
|
||||||
notify.sendNotify(`早起赢现金打卡错误`, data);
|
notify.sendNotify(`早起赢现金打卡错误`, data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user