Update jd_task_vote.js

This commit is contained in:
可达鸭 2025-06-13 08:53:24 +08:00
parent 70d594d682
commit c3f87519e5

View File

@ -10,12 +10,14 @@ export class Main extends Template {
} }
async prepare() { async prepare() {
let date = new Date(); let today = new Date();
let options = {year: 'numeric', month: '2-digit', day: '2-digit'}; let year = today.getFullYear();
let formattedDate = date.toLocaleDateString('zh-CN', options).replace(/\//g, '-'); let month = String(today.getMonth() + 1).padStart(2, '0');
let day = String(today.getDate()).padStart(2, '0');
let dateStr = `${year}-${month}-${day}`;
for (let i of Array(3)) { for (let i of Array(3)) {
let rank = await this.curl({ let rank = await this.curl({
'form': `functionId=hc_boss_queryBossRanking&body={"type":2,"rankingDay":"${formattedDate}"}&appid=home-marketing&client=apple&&clientVersion=15.1.53`, 'form': `functionId=hc_boss_queryBossRanking&body={"type":2,"rankingDay":"${dateStr}"}&appid=home-marketing&client=apple&&clientVersion=15.1.53`,
cookie: this.tester() cookie: this.tester()
} }
) )