liumiao
2021-02-02 fb51d6a23409509dd8213f7bff5b4845fc30beda
恢复权限展示
1 files modified
16 ■■■■ changed files
app/Http/Controllers/Api/v1/PersonController.php 16 ●●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/PersonController.php
@@ -31,12 +31,6 @@
        $teacherId = $this->getAndCheckTeacherId();
        $orgId = $request->post("orgId");
        $roleInfo = UserRoleModel::findRecordOneCondition(["OrgId" => $orgId, "UserId" => $teacherId, "RoleId" => 2026]);
//        $this->redis->upPrefix("App");
//        $redisName = $deviceType . $version;
//        $_key = RedisKey::MY_PAGE_MENU . $redisName;
//        $myMenuList = $this->redis->get($_key);
//        if(empty($myMenuList))
//        {
        //顶级分组菜单
        $whereTop['m.status'] = 1;
        $whereTop['m.appType'] = 2;
@@ -71,16 +65,14 @@
        foreach($myMenu as $key => $value)
        {
            $value['imageUrl'] = $this->fun->stitchingPath($value['imageUrl']);
//            if(empty($roleInfo) && $value["jumpModule"] == 5001)
//            {
//                continue;
//            }
            if(empty($roleInfo) && $value["jumpModule"] == 5001)
            {
                continue;
            }
            $myMenuTop[$value['parentid']]['menuList'][] = $value;
        }
        $myMenuList = array_values($myMenuTop);
//            $this->redis->set($_key, json_encode($myMenuList, true));
//        }
        return $this->_response($myMenuList);
    }
}