feat: 实现应用管理功能并重构API结构

- 新增应用管理页面,支持创建、查看、搜索和删除应用
- 重构API结构,将auth和app相关接口分离到独立模块
- 实现应用列表过滤和短ID生成功能
- 优化路由守卫和全局消息提示
- 更新登录页面样式和表单验证逻辑
This commit is contained in:
MaYu
2026-03-11 00:47:06 +08:00
parent d006d205c1
commit c7b0672db9
14 changed files with 725 additions and 272 deletions

View File

@@ -16,7 +16,17 @@ func NewAppHandler(service *app.AppService) *AppHandler {
}
func (h *AppHandler) List(c *gin.Context) {
apps, err := h.service.List()
params := make(map[string]any)
// 从查询参数中获取过滤条件
if name := c.Query("name"); name != "" {
params["name"] = name
}
if description := c.Query("description"); description != "" {
params["description"] = description
}
apps, err := h.service.List(params)
if err != nil {
response.FailServer(c, err.Error())
return