()
| 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(); |
no test coverage detected