Files
gin-vue-admin/server/router/system/sys_menu.go
T
PiexlMax(奇淼 d143b326b4 v2.9.0Beta版本发布
- 优化了AI规则,更利于大家规范化使用VibeCoding
- skills增加了在线板块,可以直接下载在线的skills。
- skill增加了一键打包能力
- 角色页面可以把角色可以直接分配给用户
- 菜单页面可以直接把菜单分配给角色
- API页面可以直接把API分配给角色
- 升级了AWS S3的版本
- 修复了富文本组件样式缺失的bug
- dashboard页面样式调整
- 优化了插件市场的UI,增加了分享和点赞能力
- 优化了vite环境变量的使用规则
2026-03-06 18:14:46 +08:00

30 lines
1.5 KiB
Go

package system
import (
"github.com/flipped-aurora/gin-vue-admin/server/middleware"
"github.com/gin-gonic/gin"
)
type MenuRouter struct{}
func (s *MenuRouter) InitMenuRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
menuRouter := Router.Group("menu").Use(middleware.OperationRecord())
menuRouterWithoutRecord := Router.Group("menu")
{
menuRouter.POST("addBaseMenu", authorityMenuApi.AddBaseMenu) // 新增菜单
menuRouter.POST("addMenuAuthority", authorityMenuApi.AddMenuAuthority) // 增加menu和角色关联关系
menuRouter.POST("deleteBaseMenu", authorityMenuApi.DeleteBaseMenu) // 删除菜单
menuRouter.POST("updateBaseMenu", authorityMenuApi.UpdateBaseMenu) // 更新菜单
menuRouter.POST("setMenuRoles", authorityMenuApi.SetMenuRoles) // 全量覆盖菜单关联角色
}
{
menuRouterWithoutRecord.POST("getMenu", authorityMenuApi.GetMenu) // 获取菜单树
menuRouterWithoutRecord.POST("getMenuList", authorityMenuApi.GetMenuList) // 分页获取基础menu列表
menuRouterWithoutRecord.POST("getBaseMenuTree", authorityMenuApi.GetBaseMenuTree) // 获取用户动态路由
menuRouterWithoutRecord.POST("getMenuAuthority", authorityMenuApi.GetMenuAuthority) // 获取指定角色menu
menuRouterWithoutRecord.POST("getBaseMenuById", authorityMenuApi.GetBaseMenuById) // 根据id获取菜单
menuRouterWithoutRecord.GET("getMenuRoles", authorityMenuApi.GetMenuRoles) // 获取菜单关联角色ID列表
}
return menuRouter
}