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

Method findSignActivity

wxapp/tmj.js:275–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273 }
274
275 async findSignActivity() {
276 if (!this.integralAccount) await this.ensureIntegralAccount(true);
277 const data = await this.request("/activity/common/queryActivityList", {
278 earnSpendType: 1,
279 shopId: this.shopId,
280 pageNo: 1,
281 pageSize: 10,
282 integralAccount: this.integralAccount,
283 activityType: 3,
284 }, "POST");
285 const activity = getRows(data).find((item) => String(item.activityType) === "3" && item.canJoin !== false);
286 if (!activity?.activityId) throw new Error("未找到可参与的签到活动");
287 this.signActivityId = activity.activityId;
288 this.signTitle = activity.title || "每日签到";
289 $.log(`账号[${this.index}] 签到活动: ${this.signTitle}`);
290 this.saveCachedToken();
291 }
292
293 async loadSignInfo() {
294 if (!this.signActivityId) await this.findSignActivity();

Callers 2

runMethod · 0.95
loadSignInfoMethod · 0.95

Calls 5

ensureIntegralAccountMethod · 0.95
requestMethod · 0.95
saveCachedTokenMethod · 0.95
getRowsFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected