bilibili-raffle-js icon indicating copy to clipboard operation
bilibili-raffle-js copied to clipboard

client端设计问题

Open Billyzou0741326 opened this issue 5 years ago • 2 comments

TS implementation overview

任务全放进account里有些难看了 这里分类出来各自形成class

raffle-handler/

  • storm.ts
  • smalltv.ts
  • pk.ts
  • guard.ts
  • ? anchor.ts ?

live-daily.ts

  • live-sign
  • heartbeat
  • silverbox
  • fan-group-sign
  • ? exchange-coin ?
  • ? send-gift ?

main-daily.ts

  • watch-video
  • share-video
  • ? send-coin ?
  • ? judge-case ?

Schedule Format

每个任务都要改一遍时间太麻烦了 直接上模板 简略休眠复杂度(精确到小时而非分钟)

task-config.json

{
    "task-schedule-1": {
        "tv_pk_guard": {
            "on": true,
            "sleep": [1,2,3,4,5,6]
        },
        "storm": {
            "on": true,
            "sleep": [1,2,3,4,5,6]
        }
    }
}

user-config.json

{
    "username": "",
    "password": "",
    "sleep-schedule": "task-schedule-1"
}

结果不想写了233333

Billyzou0741326 avatar Feb 27 '20 22:02 Billyzou0741326

I committed a change which, though not a total refactoring, at least simplifies task schedule configuration. If you think it's an ok stopgap solution, I can create a PR.

https://github.com/blu3mania/bilibili-raffle-js/commit/d6212d012b42214b15d1e89f4f06909512a27233

blu3mania avatar Mar 09 '20 01:03 blu3mania

Sure, this is valid.

Billyzou0741326 avatar Mar 09 '20 02:03 Billyzou0741326