feat:完善项目

This commit is contained in:
henry
2021-09-28 11:51:15 +08:00
parent da7b3130fe
commit ef9213f261
51 changed files with 67 additions and 67 deletions

View File

@ -1,7 +1,7 @@
package router
import (
"SciencesServer/app/api"
api2 "SciencesServer/app/api/api"
"github.com/gin-gonic/gin"
)
@ -22,20 +22,20 @@ func register(app *gin.Engine) {
// apiPrefix + "/account/logout",
//}...)))
// Captcha 验证码
g.GET("/captcha", new(api.Captcha).Captcha)
g.GET("/captcha", new(api2.Captcha).Captcha)
// Upload 上传管理
g.POST("/upload", new(api.Upload).Upload)
g.POST("/upload", new(api2.Upload).Upload)
// Account 账户管理
account := g.Group("/account")
{
_api := new(api.Account)
_api := new(api2.Account)
account.POST("/login", _api.Login)
account.POST("/logout", _api.Logout)
}
// User 用户管理
user := g.Group("/user")
{
_api := new(api.User)
_api := new(api2.User)
user.GET("/info", _api.Info)
user.GET("/menu", _api.Menu)
user.POST("/list", _api.List)
@ -50,7 +50,7 @@ func register(app *gin.Engine) {
// Tenant 租户管理
tenant := g.Group("/tenant")
{
_api := new(api.Tenant)
_api := new(api2.Tenant)
tenant.POST("/list", _api.List)
tenant.POST("/add", _api.Add)
tenant.POST("/edit", _api.Edit)
@ -67,7 +67,7 @@ func register(app *gin.Engine) {
// Menu 菜单管理
menu := g.Group("/menu")
{
_api := new(api.Menu)
_api := new(api2.Menu)
menu.GET("/list", _api.List)
menu.POST("/add", _api.Add)
menu.POST("/edit", _api.Edit)
@ -77,13 +77,13 @@ func register(app *gin.Engine) {
// Auth 权限管理
auth := g.Group("/auth")
{
_api := new(api.Auth)
_api := new(api2.Auth)
auth.POST("/list", _api.List)
}
// Department 部门管理
department := g.Group("/department")
{
_api := new(api.Department)
_api := new(api2.Department)
department.GET("/list", _api.List)
department.GET("/select", _api.Select)
department.POST("/add", _api.Add)
@ -93,7 +93,7 @@ func register(app *gin.Engine) {
// Role 角色管理
role := g.Group("/role")
{
_api := new(api.Role)
_api := new(api2.Role)
role.POST("/list", _api.List)
role.POST("/select", _api.Select)
role.POST("/add", _api.Add)
@ -108,7 +108,7 @@ func register(app *gin.Engine) {
// Logs 日志管理
log := g.Group("/log")
{
_api := new(api.Log)
_api := new(api2.Log)
log.POST("/login", _api.Login)
}
}