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

Method activityPush

wxapp/mimengshenghuo.js:309–334  ·  view source on GitHub ↗
(activityId, label)

Source from the content-addressed store, hash-verified

307 }
308
309 async activityPush(activityId, label) {
310 const res = await this.gql(
311 `mutation activity($activity_id: Int!) {
312 activityPush(id: $activity_id) {
313 code
314 message
315 reward_log {
316 action
317 reward_type
318 amount
319 balance
320 }
321 }
322 }`,
323 { activity_id: Number(activityId) },
324 this.token,
325 true
326 );
327 const result = res?.data?.activityPush;
328 if (!result) return `${label}失败: ${short(res)}`;
329 if (Number(result.code) === 0) {
330 const log = result.reward_log || {};
331 return `${label}成功:${log.action || label} +${log.amount ?? 0}米豆,余额=${log.balance ?? "未知"}`;
332 }
333 return `${label}失败:${result.message || short(result)}`;
334 }
335
336 async doSign() {
337 if (!this.checkIn) return "未找到签到任务";

Callers 2

doSignMethod · 0.95
doVideoMethod · 0.95

Calls 2

gqlMethod · 0.95
shortFunction · 0.70

Tested by

no test coverage detected