|
@@ -6,6 +6,7 @@ import (
|
|
|
"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
|
|
|
"database/sql"
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
+ "log"
|
|
|
"sort"
|
|
|
"strconv"
|
|
|
"strings"
|
|
@@ -82,6 +83,9 @@ func (m *WorkDesktopMenu) WorkMenuFormat() ([]*pb.MenuList, error) {
|
|
|
for _, mv := range m.MenuTree {
|
|
|
//0:默认展示;1:需验证权限,有权限展示;2:需验证权限,无权限也可展示(可用服务无权限不展示)
|
|
|
usable := m.VerifyPermissions(mv.PowerIds)
|
|
|
+ if strings.Contains(mv.Name, "服务商") {
|
|
|
+ log.Println("-----------")
|
|
|
+ }
|
|
|
//checkCode==1 验证权限结果 无权限不显示
|
|
|
if !usable && mv.CheckCode == 1 {
|
|
|
continue
|
|
@@ -188,6 +192,7 @@ func (m *WorkDesktopMenu) WorkMenuFormat() ([]*pb.MenuList, error) {
|
|
|
//资源中台获取用户权限--没有权限:title等置空
|
|
|
//ResourceLib.PowerHandle()
|
|
|
title, content, confirmUrl, confirmText, appType, openType, isShowCancel, feasibility = CheckCapitalResources(fv, m.NewUserId, m.AppId, m.EntId, m.EntUserId, usable)
|
|
|
+
|
|
|
}
|
|
|
threeLevel.Url = MC.If(fv.Url != "", fv.Url, tv.Url).(string)
|
|
|
threeLevel.Icon = MC.If(fv.Icon != "", fv.Icon, tv.Icon).(string)
|
|
@@ -213,14 +218,26 @@ func (m *WorkDesktopMenu) WorkMenuFormat() ([]*pb.MenuList, error) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //无资源中台权限 菜单不显示
|
|
|
+ if !feasibility && tv.CheckCode == 1 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
if threeLevel != nil {
|
|
|
secondLevel.Child = append(secondLevel.Child, threeLevel)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //二级菜单 有三级子菜单;才会显示
|
|
|
+ if len(secondLevel.Child) == 0 && sv.CheckCode == 1 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
oneLevel.Child = append(oneLevel.Child, secondLevel)
|
|
|
}
|
|
|
}
|
|
|
+ //一级菜单 有二级子菜单;才会显示
|
|
|
+ if len(oneLevel.Child) == 0 && mv.CheckCode == 1 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
menuList = append(menuList, oneLevel)
|
|
|
}
|
|
|
//清用户内存信息
|