()
| 217 | } |
| 218 | |
| 219 | async sign() { |
| 220 | const tasks = await this.queryTasks(); |
| 221 | const visibleSignCodes = tasks |
| 222 | .filter((item) => SIGN_TASK_CODES.includes(item.taskLabel)) |
| 223 | .map((item) => item.taskLabel); |
| 224 | const codes = visibleSignCodes.length ? visibleSignCodes : SIGN_TASK_CODES; |
| 225 | |
| 226 | for (const code of codes) { |
| 227 | try { |
| 228 | await this.completeTask(code); |
| 229 | } catch (e) { |
| 230 | this.log(`签到上报 ${code}: ${e.message || e}`); |
| 231 | } |
| 232 | await $.wait(500, 1000); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | async run() { |
| 237 | try { |
no test coverage detected