Browse Source

fix:菜单栏

Roc 1 year ago
parent
commit
7fe28cb16b
2 changed files with 4 additions and 3 deletions
  1. 4 0
      controllers/sys_menu_button.go
  2. 0 3
      controllers/voice.go

+ 4 - 0
controllers/sys_menu_button.go

@@ -10,6 +10,7 @@ type SysMenuButtonController struct {
 	BaseAuthController
 }
 
+// SysMenuButtons
 // @Title 获取菜单全部按钮
 // @Description 获取菜单全部按钮接口
 // @Param   RoleId   query   int  true       "角色ID"
@@ -29,6 +30,9 @@ func (this *SysRoleController) SysMenuButtons() {
 		return
 	}
 	listLen := len(list)
+	if listLen <= 0 {
+		list = make([]*system.ButtonMenu, 0)
+	}
 	for i := 0; i < listLen; i++ {
 		item := list[i]
 		menus, err := system.GetSysMenuButtonItems(item.MenuId)

File diff suppressed because it is too large
+ 0 - 3
controllers/voice.go


Some files were not shown because too many files changed in this diff