增加设置界面、debug日志等级、版本号展示、构建脚本
- 新增设置弹窗: trace开关/正文上限、日志等级(debug/info/warn/error)、并发数、重试次数 - 配置运行时生效,持久化到 config.json - 日志系统支持 debug 级别过滤 - 工具栏展示版本号(v0.0.2),来源 wails.json + constants.go - 抢购并发数和重试次数改为读取配置,不再写死常量 - 新增 build.sh 构建脚本,Windows exe 文件名带版本号 - config.json 加入 .gitignore
This commit is contained in:
@@ -7,7 +7,12 @@ import (
|
||||
|
||||
// Config 应用配置。
|
||||
type Config struct {
|
||||
TimeAPIURL string `json:"timeApiUrl"`
|
||||
TimeAPIURL string `json:"timeApiUrl"`
|
||||
TraceEnabled bool `json:"traceEnabled"`
|
||||
TraceMaxBody int `json:"traceMaxBody"`
|
||||
LogLevel string `json:"logLevel"` // debug / info / warn / error
|
||||
Concurrency int `json:"concurrency"` // 抢购并发数
|
||||
Attempts int `json:"attempts"` // 单号重试次数
|
||||
}
|
||||
|
||||
// AppPaths 运行时路径。
|
||||
|
||||
Reference in New Issue
Block a user