|
|
@@ -287,20 +287,20 @@ func createPCWebMenu(datas []interface{}, loginID int) []PCWebMenu {
|
|
|
if data["isshow"].(bool) {
|
|
|
// 判断权限
|
|
|
rulekey := ""
|
|
|
- if data["rulekey"] != nil {
|
|
|
- rulekey = data["rulekey"].(string)
|
|
|
- requireAuth := rulekey != ""
|
|
|
- if requireAuth {
|
|
|
- // 判断是否有权限
|
|
|
- funcMenuList, err := models.GetErmcpRoleFuncMenuLists(loginID, rulekey)
|
|
|
- if err != nil {
|
|
|
- continue
|
|
|
- }
|
|
|
- if len(funcMenuList) == 0 {
|
|
|
- continue
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if data["rulekey"] != nil {
|
|
|
+ // rulekey = data["rulekey"].(string)
|
|
|
+ // requireAuth := rulekey != ""
|
|
|
+ // if requireAuth {
|
|
|
+ // // 判断是否有权限
|
|
|
+ // funcMenuList, err := models.GetErmcpRoleFuncMenuLists(loginID, rulekey)
|
|
|
+ // if err != nil {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ // if len(funcMenuList) == 0 {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
// 构建页面(按钮)权限
|
|
|
auths := make([]PCWebMenuAuth, 0)
|
|
|
@@ -311,20 +311,20 @@ func createPCWebMenu(datas []interface{}, loginID int) []PCWebMenu {
|
|
|
if am["isshow"].(bool) {
|
|
|
// 判断权限
|
|
|
rulekeySub := ""
|
|
|
- if am["rulekey"] != nil {
|
|
|
- rulekeySub = am["rulekey"].(string)
|
|
|
- requireAuth := rulekeySub != ""
|
|
|
- if requireAuth {
|
|
|
- // 判断是否有权限
|
|
|
- funcMenuList, err := models.GetErmcpRoleFuncMenuLists(loginID, rulekeySub)
|
|
|
- if err != nil {
|
|
|
- continue
|
|
|
- }
|
|
|
- if len(funcMenuList) == 0 {
|
|
|
- continue
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if am["rulekey"] != nil {
|
|
|
+ // rulekeySub = am["rulekey"].(string)
|
|
|
+ // requireAuth := rulekeySub != ""
|
|
|
+ // if requireAuth {
|
|
|
+ // // 判断是否有权限
|
|
|
+ // funcMenuList, err := models.GetErmcpRoleFuncMenuLists(loginID, rulekeySub)
|
|
|
+ // if err != nil {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ // if len(funcMenuList) == 0 {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
auth := PCWebMenuAuth{
|
|
|
Label: am["label"].(string),
|