feat: 实现 Admin 采购员账号管理 (#51)

This commit is contained in:
chengma
2026-08-09 13:50:55 +08:00
parent 771e2ee616
commit eea0d65ef8
12 changed files with 909 additions and 20 deletions
+7
View File
@@ -83,6 +83,13 @@ func Register(r *gin.Engine, db *sql.DB, onlineThreshold time.Duration) {
// 5. 客户端列表
pages.GET("/clients", h.ClientList)
pages.POST("/clients/delete", h.ClientDelete)
// 6. 用户管理:先经过网页登录,再叠加管理员角色校验。
users := pages.Group("/users", AdminRequired())
users.GET("", h.UserList)
users.POST("/create", h.UserCreate)
users.POST("/status", h.UserSetStatus)
users.POST("/reset-password", h.UserResetPassword)
}
// page 组装每个页面都要的公共数据(导航高亮、标题、CSRF token)。