| 328 | } |
| 329 | |
| 330 | async signIn() { |
| 331 | try { |
| 332 | const result = await this.request("/sign/activity/sign", { |
| 333 | method: "POST", |
| 334 | isJson: true, |
| 335 | data: { activity_code: this.activity_code, fill_date: "" }, |
| 336 | }); |
| 337 | if (result?.is_sign === true || result?.success === true) { |
| 338 | $.log("签到成功"); |
| 339 | } else { |
| 340 | $.log(`签到失败 [${result?.message || JSON.stringify(result)}]`); |
| 341 | } |
| 342 | } catch (e) { |
| 343 | const message = String(e.message || e); |
| 344 | if (/已签|重复/.test(message)) { |
| 345 | $.log("今日已签到"); |
| 346 | return; |
| 347 | } |
| 348 | $.log(`签到失败 [${message}]`); |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | async task_1() { |
| 353 | try { |