专项答题新增最小可接收值

This commit is contained in:
johlanse 2022-05-27 20:20:15 +08:00
parent 047cc82dbb
commit 31c7d18db7
3 changed files with 9 additions and 4 deletions

View File

@ -54,6 +54,8 @@ type Config struct {
// 重试时间
Intervals int `json:"intervals" yaml:"intervals"`
} `json:"retry" yaml:"retry"`
// 专项答题可接受的最小值
SpecialMinScore int `json:"special_min_score" yaml:"special_min_score"`
}
var (
@ -91,5 +93,8 @@ func GetConfig() Config {
if config.Scheme == "" {
config.Scheme = "https://johlanse.github.io/study_xxqg/scheme.html?"
}
if config.SpecialMinScore == 0 {
config.SpecialMinScore = 10
}
return config
}

View File

@ -72,4 +72,7 @@ edge_path: ""
qr_code: false
# 启动时等待时间,为了防止代理启动比软件慢而报错,默认不等待,单位秒
start_wait: 0
start_wait: 0
# 专项答题可接受的最小分值,因一天重复运行的时候,若专项答题未能答满会继续答新的一套题,会浪费题
special_min_score: 10

View File

@ -158,9 +158,6 @@ func do(m string) {
core.Init()
var user *model.User
users, _ := model.Query()
for i := 0; i < 25; i++ {
core.Push("text", "登录")
}
study := func(core2 *lib.Core, u *model.User) {
go core2.LearnArticle(u)
go core2.LearnVideo(u)