fix: 修复微信账单金额解析问题(半角¥符号支持)

- 修复 parse_amount 函数同时支持全角¥和半角¥
- 新增 MonthRangePicker 日期选择组件
- 新增 /api/monthly-stats 接口获取月度统计
- 分析页面月度趋势使用全量数据
- 新增健康检查路由
This commit is contained in:
2026-01-10 19:21:24 +08:00
parent 9247e1ec7f
commit eb76c3a8dc
20 changed files with 597 additions and 44 deletions

View File

@@ -11,6 +11,7 @@ import (
// Config 服务配置
type Config struct {
Version string // 应用版本
Port string // 服务端口
ProjectRoot string // 项目根目录
PythonPath string // Python 解释器路径
@@ -31,6 +32,7 @@ type Config struct {
// configFile YAML 配置文件结构
type configFile struct {
Version string `yaml:"version"`
Server struct {
Port int `yaml:"port"`
} `yaml:"server"`
@@ -117,6 +119,7 @@ func Load() {
flag.Parse()
// 设置默认值
Global.Version = "0.0.1"
Global.Port = getEnvOrDefault("PORT", "8080")
Global.ProjectRoot = getDefaultProjectRoot()
Global.PythonPath = getDefaultPythonPath()
@@ -145,6 +148,9 @@ func Load() {
// 加载配置文件
if cfg := loadConfigFile(configPath); cfg != nil {
fmt.Printf("📄 加载配置文件: %s\n", configPath)
if cfg.Version != "" {
Global.Version = cfg.Version
}
if cfg.Server.Port > 0 {
Global.Port = fmt.Sprintf("%d", cfg.Server.Port)
}