feat: 导航页文案可后台配置 + webhook修复 + 企业微信通知可用

- 导航页所有文案(标题/副标题/标签/咨询区/页脚/工作室名称)均可在后台「导航页设置」页配置
- 新增公开API GET /api/v1/nav-settings,导航页加载时自动拉取配置覆盖默认值
- CustomerHandler改为从数据库读取webhook URL,不再依赖config.yaml
- 新增默认企业微信webhook地址,开箱即用
- 后台新增webhook测试专用接口 POST /api/v1/admin/webhook/test
- 后台新增批量配置保存接口 PUT /api/v1/admin/config-batch
- 后台新增「导航页设置」管理页面,支持分组编辑保存
- 页脚添加工作室名称展示位
This commit is contained in:
2026-09-09 02:49:39 +08:00
parent 5e47757c73
commit 3580066a13
7 changed files with 328 additions and 58 deletions

View File

@@ -162,6 +162,9 @@ func Setup(
customer.POST("/submit", customerH.Submit)
}
// 导航页设置(公开,无需认证)
api.GET("/nav-settings", configH.GetNavSettings)
// 需要登录的路由
authed := api.Group("")
authed.Use(middleware.JWTAuth(cfg.JWT.Secret))
@@ -205,6 +208,10 @@ func Setup(
admin.GET("/config", configH.ListConfigs)
admin.GET("/config/:key", configH.GetConfig)
admin.PUT("/config/:key", configH.SetConfig)
admin.PUT("/config-batch", configH.BatchSetConfigs)
// Webhook 测试
admin.POST("/webhook/test", customerH.TestWebhook)
}
}