diff --git a/conf/config.yaml b/conf/config.yaml index 7ea249e..009bc19 100755 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -21,3 +21,17 @@ qqgid: default_priority: no_ghproxy: true daily_asset_push_cron: +task: + - cron: 0 6 * * * + path: https://raw.githubusercontent.com/cdle/xdd/main/scripts/jd_goodMorning.js + enable: true + word: 早起打卡 + mode: obo + - cron: 0 0 * * * + path: https://raw.githubusercontent.com/cdle/xdd/main/scripts/jd_angryBean.js + enable: true + word: 抢京豆 + mode: alo + env: + - name: angryBeanPins + - value: jd_xxxxx&jd_ooooo diff --git a/models/config.go b/models/config.go index 59a59b2..184b159 100644 --- a/models/config.go +++ b/models/config.go @@ -1,7 +1,6 @@ package models import ( - "bufio" "io" "io/ioutil" "os" @@ -11,26 +10,9 @@ import ( "gopkg.in/yaml.v2" ) -type Container struct { - Type string - Name string - Default bool - Address string - Username string - Password string - Path string - Version string - Token string - Available bool - Delete []string - Weigth int - Mode string - Reader *bufio.Reader - Config string - Limit int -} type Yaml struct { Containers []Container + Tasks []Task Qrcode string Master string Mode string diff --git a/models/container.go b/models/container.go index e001e77..cb3fb0d 100644 --- a/models/container.go +++ b/models/container.go @@ -22,6 +22,25 @@ const ( LI = "li" ) +type Container struct { + Type string + Name string + Default bool + Address string + Username string + Password string + Path string + Version string + Token string + Available bool + Delete []string + Weigth int + Mode string + Reader *bufio.Reader + Config string + Limit int +} + func initContainer() { for i := range Config.Containers { if Config.Containers[i].Weigth == 0 { diff --git a/models/task.go b/models/task.go index 2640e7f..c201125 100644 --- a/models/task.go +++ b/models/task.go @@ -1 +1,14 @@ package models + +type Task struct { + Cron string + Path string + Enable bool + Mode string //obo alo + Word string +} + +type Env struct { + Name string + Value string +}