| 527 | } |
| 528 | |
| 529 | async doQuestionTask() { |
| 530 | try { |
| 531 | const questions = listify(await this.gardenGet("/garden/Gardenquestiontask/index")); |
| 532 | if (!questions.length) { |
| 533 | $.log(`账号[${this.index}] 每日一答无题目`); |
| 534 | return; |
| 535 | } |
| 536 | for (const q of questions) { |
| 537 | const id = q.id; |
| 538 | const answer = q.answer; |
| 539 | if (!id || !answer) continue; |
| 540 | const data = await this.encryptedGet("/garden/Gardenquestiontask/answerResultsJph", { |
| 541 | question_id: id, |
| 542 | answer, |
| 543 | }); |
| 544 | $.log(`账号[${this.index}] 每日一答完成: ${q.title ? shortJson(q.title, 45) : id} => ${shortJson(data || "ok")}`); |
| 545 | await $.wait(500, 1200); |
| 546 | } |
| 547 | } catch (e) { |
| 548 | $.log(`账号[${this.index}] 每日一答失败: ${e.message || e}`); |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | async doRealityTask() { |
| 553 | try { |