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

Method runTaskChannel

wxapp/ctrip.js:511–531  ·  view source on GitHub ↗
({ channelCode, label })

Source from the content-addressed store, hash-verified

509 }
510
511 async runTaskChannel({ channelCode, label }) {
512 let tasks = await this.queryTaskList(channelCode, label);
513 for (const task of tasks) {
514 const status = Number(task.status ?? task.taskStatus ?? 0);
515 if (status === 0 || status === 1) {
516 await this.doTask(channelCode, task, label);
517 await $.wait(800, 1500);
518 }
519 }
520
521 tasks = await this.queryTaskList(channelCode, `${label}复查`);
522 for (const task of tasks) {
523 const status = Number(task.status ?? task.taskStatus ?? 0);
524 if (status === 2) {
525 await this.awardTask(channelCode, task, label);
526 await $.wait(800, 1500);
527 } else if (status === 3) {
528 $.log(`账号[${this.index}] ${label} 已完成: ${taskTitle(task)}`);
529 }
530 }
531 }
532
533 async queryPointInfo() {
534 const point = await this.h5Model("22769", "getSignInUserBasicInfo", {});

Callers 1

runMethod · 0.95

Calls 6

queryTaskListMethod · 0.95
doTaskMethod · 0.95
awardTaskMethod · 0.95
taskTitleFunction · 0.85
waitMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected