MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / doQuestionTask

Method doQuestionTask

wxapp/junpinhui.js:529–550  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers 1

doTasksMethod · 0.95

Calls 6

gardenGetMethod · 0.95
encryptedGetMethod · 0.95
listifyFunction · 0.85
shortJsonFunction · 0.85
logMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected