MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / submitTask

Method submitTask

wxapp/yichengtong.js:341–354  ·  view source on GitHub ↗
(task)

Source from the content-addressed store, hash-verified

339 }
340
341 async submitTask(task) {
342 const id = task.id || task.configId;
343 if (!id) return false;
344 const res = await this.api("post", "/client/user/taskSub", {
345 data: { configId: id },
346 });
347 if (res.status === 200 && ok(res.data)) {
348 $.log(`账号[${this.index}] 任务提交成功: ${taskName(task)} ${res.data.msg || ""}`);
349 return true;
350 }
351 const msg = res.data?.msg || res.data?.message || res.text.slice(0, 500);
352 $.log(`账号[${this.index}] 任务提交失败: ${taskName(task)},${msg}`);
353 return false;
354 }
355
356 async doDailyTasks(taskHome = null) {
357 const data = taskHome || (await this.queryTaskHome());

Callers 1

doDailyTasksMethod · 0.95

Calls 4

apiMethod · 0.95
taskNameFunction · 0.85
okFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected