🐛 修复因返回空值到前端导致路由树无法正确加载的BUG

This commit is contained in:
李寻欢 2024-02-05 15:29:09 +08:00
parent 3fbc6780a0
commit 2f736e521c

View File

@ -47,6 +47,10 @@ func GetUserMenus(userId string) (records []menu.Item, err error) {
if err != nil {
return
}
if len(menus) == 0 {
records = make([]menu.Item, 0)
return
}
// 处理出菜单Id对应的角色代码然后去重
var items []menuRecordItem