feat:完善信息

This commit is contained in:
henry
2021-10-15 15:06:02 +08:00
parent af8691e943
commit ae9fb8ea0f
86 changed files with 215 additions and 216 deletions

View File

@ -1,9 +1,8 @@
package router
import (
api3 "SciencesServer/app/enterprise/api"
api2 "SciencesServer/app/manage/api"
api2 "SciencesServer/app/api/enterprise/api"
"SciencesServer/app/api/manage/api"
"github.com/gin-gonic/gin"
)
@ -24,20 +23,20 @@ func registerAPI(app *gin.Engine) {
// apiPrefix + "/account/logout",
//}...)))
// Captcha 验证码
g.GET("/captcha", new(api2.Captcha).Captcha)
g.GET("/captcha", new(api.Captcha).Captcha)
// Upload 上传管理
g.POST("/upload", new(api2.Upload).Upload)
g.POST("/upload", new(api.Upload).Upload)
// Account 账户管理
account := g.Group("/account")
{
_api := new(api2.Account)
_api := new(api.Account)
account.POST("/login", _api.Login)
account.POST("/logout", _api.Logout)
}
// User 用户管理
user := g.Group("/user")
{
_api := new(api2.User)
_api := new(api.User)
user.GET("/info", _api.Info)
user.GET("/menu", _api.Menu)
user.POST("/list", _api.List)
@ -52,7 +51,7 @@ func registerAPI(app *gin.Engine) {
// Tenant 租户管理
tenant := g.Group("/tenant")
{
_api := new(api2.Tenant)
_api := new(api.Tenant)
tenant.POST("/list", _api.List)
tenant.POST("/add", _api.Add)
tenant.POST("/edit", _api.Edit)
@ -69,7 +68,7 @@ func registerAPI(app *gin.Engine) {
// Menu 菜单管理
menu := g.Group("/menu")
{
_api := new(api2.Menu)
_api := new(api.Menu)
menu.GET("/list", _api.List)
menu.POST("/add", _api.Add)
menu.POST("/edit", _api.Edit)
@ -79,13 +78,13 @@ func registerAPI(app *gin.Engine) {
// Auth 权限管理
auth := g.Group("/auth")
{
_api := new(api2.Auth)
_api := new(api.Auth)
auth.POST("/list", _api.List)
}
// Department 部门管理
department := g.Group("/department")
{
_api := new(api2.Department)
_api := new(api.Department)
department.GET("/list", _api.List)
department.GET("/select", _api.Select)
department.POST("/add", _api.Add)
@ -95,7 +94,7 @@ func registerAPI(app *gin.Engine) {
// Role 角色管理
role := g.Group("/role")
{
_api := new(api2.Role)
_api := new(api.Role)
role.POST("/list", _api.List)
role.POST("/select", _api.Select)
role.POST("/add", _api.Add)
@ -110,7 +109,7 @@ func registerAPI(app *gin.Engine) {
// Logs 日志管理
log := g.Group("/log")
{
_api := new(api2.Log)
_api := new(api.Log)
log.POST("/login", _api.Login)
}
}
@ -122,13 +121,13 @@ func registerEnterpriseAPI(app *gin.Engine) {
// Config 配置管理
config := g.Group("/config")
{
_api := new(api3.Config)
_api := new(api2.Config)
config.GET("/area", _api.Area)
}
// Technology 技术管理
technology := g.Group("/technology")
{
_api := new(api3.Technology)
_api := new(api2.Technology)
technology.POST("/paper", _api.Paper)
technology.POST("/paper/add", _api.PaperAdd)
technology.POST("/paper/edit", _api.PaperEdit)