feat:完善项目
This commit is contained in:
@ -42,6 +42,9 @@ func (this *Router) registerAPI() {
|
||||
apiPrefix + "/v1/user/info",
|
||||
}...)))
|
||||
v1 := g.Group("/v1")
|
||||
|
||||
v1.GET("/captcha", new(api.Captcha).Captcha)
|
||||
v1.POST("/upload", new(api.Upload).Upload)
|
||||
// Account 接口管理
|
||||
accountV1 := v1.Group("/account")
|
||||
{
|
||||
@ -49,12 +52,31 @@ func (this *Router) registerAPI() {
|
||||
accountV1.POST("/login", _api.Login)
|
||||
accountV1.POST("/logout", _api.Logout)
|
||||
}
|
||||
// Menu 菜单管理
|
||||
menuV1 := v1.Group("/menu")
|
||||
{
|
||||
_api := new(api.Menu)
|
||||
menuV1.POST("/list", _api.List)
|
||||
menuV1.POST("/add", _api.Add)
|
||||
menuV1.POST("/edit", _api.Edit)
|
||||
menuV1.POST("/status", _api.Status)
|
||||
menuV1.POST("/delete", _api.Delete)
|
||||
}
|
||||
// User 用户管理
|
||||
UserV1 := v1.Group("/user")
|
||||
userV1 := v1.Group("/user")
|
||||
{
|
||||
_api := new(api.User)
|
||||
UserV1.GET("/info", _api.Info)
|
||||
UserV1.GET("/list", _api.List)
|
||||
userV1.GET("/info", _api.Info)
|
||||
userV1.GET("/menu", _api.Menu)
|
||||
userV1.POST("/list", _api.List)
|
||||
}
|
||||
// Role 角色管理
|
||||
roleV1 := v1.Group("/role")
|
||||
{
|
||||
_api := new(api.User)
|
||||
roleV1.POST("/list", _api.List)
|
||||
roleV1.GET("/menu", _api.Menu)
|
||||
roleV1.GET("/list", _api.List)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user