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

Method completeTask

wxapp/skyworth.js:207–217  ·  view source on GitHub ↗
(taskCode)

Source from the content-addressed store, hash-verified

205 }
206
207 async completeTask(taskCode) {
208 const headers = taskSignHeaders({ taskCode });
209 const result = await this.api("GET", `/v1/complete-task/${taskCode}`, { taskCode }, headers);
210 if (Number(result?.code) === 20043 && String(result?.msg || "").includes("已完成")) {
211 this.log(`签到上报 ${taskCode}: 今日已完成`);
212 return result.msg;
213 }
214 const data = this.assertOk(result, `完成任务 ${taskCode}`);
215 this.log(`签到上报 ${taskCode}: ${data || "成功"}`);
216 return data;
217 }
218
219 async sign() {
220 const tasks = await this.queryTasks();

Callers 1

signMethod · 0.95

Calls 4

apiMethod · 0.95
logMethod · 0.95
assertOkMethod · 0.95
taskSignHeadersFunction · 0.85

Tested by

no test coverage detected