()
| 265 | } |
| 266 | |
| 267 | async signIn() { |
| 268 | const { signed } = await this.querySignDetail(); |
| 269 | if (signed) return this.log("签到结果: 今日已签到,跳过"); |
| 270 | const result = await this.h5Request("POST", "/api/cn/oapi/marketing/cumulativeSignIn/signIn", { |
| 271 | activityId: SIGN_ACTIVITY_ID, |
| 272 | captchaCode: "", |
| 273 | creditsAddActionId: CREDITS_ADD_ACTION_ID, |
| 274 | business: BUSINESS, |
| 275 | }); |
| 276 | const data = result.data || {}; |
| 277 | if (data.receiveStatus === false) { |
| 278 | this.log(`签到结果: 失败,${data.receiveFailMsg || result.message || "未知原因"}`); |
| 279 | return; |
| 280 | } |
| 281 | this.log(`签到结果: 成功,获得 ${data.awardValue ?? "-"}${awardTypeName(data.awardType)}`); |
| 282 | await this.querySignDetail(); |
| 283 | } |
| 284 | |
| 285 | async run() { |
| 286 | try { |
no test coverage detected