mirror of
https://github.com/shufflewzc/faker3.git
synced 2026-04-04 00:44:07 +08:00
sync
This commit is contained in:
@@ -15,18 +15,18 @@ let shareCodesSelf: string[] = [], shareCodes: string[] = [], shareCodesHW: stri
|
||||
let min: number[] = [0.02, 0.12, 0.3, 0.4, 0.6, 0.7, 0.8, 1, 1.2, 2, 3.6], log: string
|
||||
|
||||
!(async () => {
|
||||
cookiesArr = await requireConfig()
|
||||
cookiesArr = await requireConfig(false)
|
||||
cookiesArr = cookiesArr.slice(0, 1)
|
||||
await join()
|
||||
await help()
|
||||
|
||||
cookiesArr = await requireConfig()
|
||||
cookiesArr = await requireConfig(false)
|
||||
cookiesArr = cookiesArr.slice(0, 9)
|
||||
if (new Date().getHours() === 0)
|
||||
if (new Date().getHours() !== 6)
|
||||
await join()
|
||||
await getShareCodeSelf()
|
||||
await help()
|
||||
await open(0)
|
||||
await open(1)
|
||||
})()
|
||||
|
||||
async function join() {
|
||||
@@ -35,7 +35,7 @@ async function join() {
|
||||
cookie = value
|
||||
UserName = decodeURIComponent(cookie.match(/pt_pin=([^;]*)/)![1])
|
||||
console.log(`\n开始【京东账号${index + 1}】${UserName}\n`)
|
||||
for (let i = 0; i < 5; i++) {
|
||||
for (let i = 0; i < 3; i++) {
|
||||
try {
|
||||
log = await getLog()
|
||||
res = await api('h5launch', {followShop: 0, random: log.match(/"random":"(\d+)"/)[1], log: log.match(/"log":"(.*)"/)[1], sceneid: 'JLHBhPageh5'})
|
||||
@@ -133,27 +133,29 @@ async function help() {
|
||||
shareCodes = Array.from(new Set([...shareCodesSelf, ...shareCodesHW]))
|
||||
}
|
||||
|
||||
let me: string = await getShareCodeSelf(true)
|
||||
let success: boolean = false
|
||||
let me: string = await getShareCodeSelf(true), remain: boolean = true
|
||||
for (let code of shareCodes) {
|
||||
if (success) break
|
||||
if (!remain) break
|
||||
let success: boolean = false
|
||||
if (!fullCode.includes(code) && code !== me) {
|
||||
console.log(`账号${index + 1} ${UserName} 去助力 ${code} ${shareCodesSelf.includes(code) ? '*内部*' : ''}`)
|
||||
for (let i = 0; i < 5; i++) {
|
||||
if (success) break
|
||||
log = await getLog()
|
||||
res = await api('jinli_h5assist', {"redPacketId": code, "followShop": 0, random: log.match(/"random":"(\d+)"/)[1], log: log.match(/"log":"(.*)"/)[1], sceneid: 'JLHBhPageh5'})
|
||||
if (res.rtn_code === 403) {
|
||||
console.log('log error')
|
||||
await wait(5000)
|
||||
} else {
|
||||
success = true
|
||||
if (res.data.result.status === 0) {
|
||||
console.log('助力成功:', parseFloat(res.data.result.assistReward.discount))
|
||||
success = true
|
||||
await wait(45000)
|
||||
remain = false
|
||||
break
|
||||
} else if (res.data.result.status === 3) {
|
||||
console.log('今日助力次数已满')
|
||||
success = true
|
||||
remain = false
|
||||
await wait(45000)
|
||||
break
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user