Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client端设计问题 #32

Open
Billyzou0741326 opened this issue Feb 27, 2020 · 2 comments
Open

client端设计问题 #32

Billyzou0741326 opened this issue Feb 27, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Billyzou0741326
Copy link
Owner

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 Billyzou0741326 added the enhancement New feature or request label Feb 27, 2020
@blu3mania
Copy link
Contributor

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

@Billyzou0741326
Copy link
Owner Author

Sure, this is valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants