enable pk

This commit is contained in:
any
2021-01-26 18:17:57 +08:00
parent b592e639bd
commit 0d8a72d621

View File

@@ -100,13 +100,14 @@ async function jdNian() {
$.hasGroup = false $.hasGroup = false
await pkTaskDetail() await pkTaskDetail()
if ($.hasGroup) await pkInfo() if ($.hasGroup) await pkInfo()
await helpFriendsPK() //await helpFriendsPK()
} }
if (12 <= hour && hour < 14) { if (12 <= hour && hour < 14) {
// 北京时间20点-22点 // 北京时间20点-22点
$.hasGroup = false $.hasGroup = false
await pkTaskStealDetail() await pkTaskStealDetail()
if ($.hasGroup) await pkInfo() if ($.hasGroup) await pkInfo()
await helpFriendsPK()
} }
await $.wait(2000) await $.wait(2000)
await killCouponList() await killCouponList()
@@ -118,7 +119,7 @@ async function jdNian() {
await $.wait(1000) await $.wait(1000)
await doTask() await doTask()
await $.wait(2000) await $.wait(2000)
await helpFriends() //await helpFriends()
await $.wait(2000) await $.wait(2000)
await getHomeData(true) await getHomeData(true)
await showMsg() await showMsg()
@@ -1135,7 +1136,9 @@ function shareCodesFormatPk() {
const tempIndex = $.index > pkInviteCodes.length ? (pkInviteCodes.length - 1) : ($.index - 1); const tempIndex = $.index > pkInviteCodes.length ? (pkInviteCodes.length - 1) : ($.index - 1);
$.newShareCodesPk = pkInviteCodes[tempIndex].split('@'); $.newShareCodesPk = pkInviteCodes[tempIndex].split('@');
} }
const readShareCodeRes = null //await readShareCodePk(); let readShareCodeRes = null
if (new Date().getUTCHours() >= 12)
readShareCodeRes = await readShareCodePk();
if (readShareCodeRes && readShareCodeRes.code === 200) { if (readShareCodeRes && readShareCodeRes.code === 200) {
$.newShareCodesPk = [...new Set([...$.newShareCodesPk, ...(readShareCodeRes.data || [])])]; $.newShareCodesPk = [...new Set([...$.newShareCodesPk, ...(readShareCodeRes.data || [])])];
} }