增加设置界面、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:
yml2213
2026-06-24 20:18:33 +08:00
parent 154e55d484
commit 8790c4ca33
10 changed files with 365 additions and 21 deletions
+6 -1
View File
@@ -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 运行时路径。