mirror of
https://github.com/shufflewzc/faker3.git
synced 2026-04-04 00:44:07 +08:00
update
This commit is contained in:
40
jd_zjd.ts
40
jd_zjd.ts
@@ -1,16 +1,18 @@
|
||||
/**
|
||||
* v0.2
|
||||
* const $ = new Env('赚喜豆-TS版');
|
||||
* cron: 15,30,45 0 * * *
|
||||
* CK1 优先助力HW.ts
|
||||
* 修改自HW大佬,默认开团前7,需要请自行修改
|
||||
* 修改自HW大佬,纯内部助力,定时请自行修改,频繁跑火爆黑IP
|
||||
* 修改自HW大佬,建议使用原作者版本,衰仔,明白了吗?
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import {zjdInit, zjdH5st} from "./utils/jd_zjd_tool.js";
|
||||
import {o2s, wait, requireConfig, getshareCodeHW} from "./TS_USER_AGENTS";
|
||||
import {zjdInit, zjdH5st} from "./function/zjdtool.js";
|
||||
import {o2s, wait, requireConfig} from "./function/TS_USER_AGENTS";
|
||||
import {SHA256} from "crypto-js";
|
||||
|
||||
let cookie: string = '', res: any = '', UserName: string
|
||||
let shareCodeSelf: Tuan[] = [], shareCode: Tuan[] = [], shareCodeHW: any = []
|
||||
let shareCodeSelf: Tuan[] = [], shareCode: Tuan[] = []
|
||||
|
||||
interface Tuan {
|
||||
activityIdEncrypted: string, // id
|
||||
@@ -19,11 +21,13 @@ interface Tuan {
|
||||
}
|
||||
|
||||
!(async () => {
|
||||
let cookiesArr: string[] = await requireConfig()
|
||||
let cookiesArr: string[] = await requireConfig(false)
|
||||
for (let [index, value] of cookiesArr.entries()) {
|
||||
try {
|
||||
if(index < 7){
|
||||
try {
|
||||
await zjdInit()
|
||||
cookie = value
|
||||
|
||||
UserName = decodeURIComponent(cookie.match(/pt_pin=([^;]*)/)![1])
|
||||
console.log(`\n开始【京东账号${index + 1}】${UserName}\n`)
|
||||
|
||||
@@ -73,33 +77,26 @@ interface Tuan {
|
||||
} else if (!res.data.canStartNewAssist) {
|
||||
console.log('不可开团')
|
||||
}
|
||||
await wait(1000)
|
||||
} catch (e) {
|
||||
continue
|
||||
}
|
||||
await wait(1000)
|
||||
}
|
||||
}
|
||||
|
||||
o2s(shareCodeSelf)
|
||||
await wait(2000)
|
||||
|
||||
console.log('内部助力:', shareCodeSelf)
|
||||
for (let [index, value] of cookiesArr.entries()) {
|
||||
if (shareCodeHW.length === 0) {
|
||||
shareCodeHW = await getshareCodeHW('zjd');
|
||||
}
|
||||
shareCode = index === 0
|
||||
? Array.from(new Set([...shareCodeHW, ...shareCodeSelf]))
|
||||
: Array.from(new Set([...shareCodeSelf, ...shareCodeHW]))
|
||||
|
||||
cookie = value
|
||||
try {
|
||||
cookie = value
|
||||
UserName = decodeURIComponent(cookie.match(/pt_pin=([^;]*)/)![1])
|
||||
console.log(`\n开始【京东账号${index + 1}】${UserName}\n`)
|
||||
shareCode = Array.from(new Set([...shareCodeSelf]))
|
||||
|
||||
await zjdInit()
|
||||
for (let code of shareCode) {
|
||||
try {
|
||||
console.log(`账号${index + 1} ${UserName} 去助力 ${code.assistedPinEncrypted.replace('\n', '')}`)
|
||||
res = await api('vvipclub_distributeBean_assist', {"activityIdEncrypted": code.activityIdEncrypted, "assistStartRecordId": code.assistStartRecordId, "assistedPinEncrypted": code.assistedPinEncrypted, "channel": "FISSION_BEAN", "launchChannel": "undefined"})
|
||||
|
||||
if (res.resultCode === '9200008') {
|
||||
console.log('不能助力自己')
|
||||
} else if (res.resultCode === '2400203' || res.resultCode === '90000014') {
|
||||
@@ -121,6 +118,9 @@ interface Tuan {
|
||||
await wait(2000)
|
||||
}
|
||||
await wait(2000)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user