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

Method signIn

wxapp/feihe.js:246–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

244 }
245
246 async signIn() {
247 const finish = await this.request({
248 apiPath: "/api/member/signin/tofinish",
249 query: { taskType: SIGN_TASK_TYPE },
250 allowFail: true,
251 });
252 if (String(finish?.code) === "200" && finish.data === true) {
253 $.log(`账号[${this.index}] 签到任务已上报`);
254 } else if (String(finish?.code) === "200") {
255 $.log(`账号[${this.index}] 签到接口返回: ${JSON.stringify(finish.data)}`);
256 } else {
257 throw new Error(`签到失败: ${finish?.msg || JSON.stringify(finish)}`);
258 }
259
260 const complete = await this.request({
261 apiPath: "/api/member/signin/completeTask",
262 query: { taskType: SIGN_TASK_TYPE },
263 allowFail: true,
264 });
265 if (String(complete?.code) === "200") {
266 const points = complete.data?.awardSendPoints || complete.data?.awardPoint || "";
267 $.log(`账号[${this.index}] 签到完成${points ? `,获得${points}积分` : ""}`);
268 } else if (complete?.msg) {
269 $.log(`账号[${this.index}] 完成确认返回: ${complete.msg}`);
270 }
271 }
272}
273
274!(async () => {

Callers 1

runMethod · 0.95

Calls 2

requestMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected