feat: 优化后台UI

This commit is contained in:
chenzifan
2024-03-11 13:51:26 +08:00
parent bf27b44fee
commit 24de97fac2
13 changed files with 200 additions and 28 deletions

View File

@@ -369,16 +369,30 @@ func main() {
group.GET("token", h.GenToken)
}),
// 系统管理员
fx.Provide(admin.NewSysUserHandler),
fx.Invoke(func(s *core.AppServer, h *admin.SysUserHandler) {
group := s.Engine.Group("/api/admin/sysUser/")
group.POST("save", h.Save)
group.GET("list", h.List)
group.POST("remove", h.Remove)
group.POST("resetPass", h.ResetPass)
// 验证码
fx.Provide(admin.NewCaptchaHandler),
fx.Invoke(func(s *core.AppServer, h *admin.CaptchaHandler) {
group := s.Engine.Group("/api/admin/login/")
group.GET("captcha", h.GetCaptcha)
}),
fx.Provide(admin.NewUploadHandler),
fx.Invoke(func(s *core.AppServer, h *admin.UploadHandler) {
s.Engine.POST("/api/admin/upload", h.Upload)
s.Engine.GET("/api/admin/upload/list", h.List)
s.Engine.GET("/api/admin/upload/remove", h.Remove)
}),
//// 系统管理员
//fx.Provide(admin.NewSysUserHandler),
//fx.Invoke(func(s *core.AppServer, h *admin.SysUserHandler) {
// group := s.Engine.Group("/api/admin/sysUser/")
// group.POST("save", h.Save)
// group.GET("list", h.List)
// group.POST("remove", h.Remove)
// group.POST("resetPass", h.ResetPass)
//}),
fx.Provide(handler.NewFunctionHandler),
fx.Invoke(func(s *core.AppServer, h *handler.FunctionHandler) {
group := s.Engine.Group("/api/function/")