diff --git a/app/common/logic/AuthLogic.php b/app/common/logic/AuthLogic.php index 9abe5e1..ba3acda 100644 --- a/app/common/logic/AuthLogic.php +++ b/app/common/logic/AuthLogic.php @@ -539,23 +539,30 @@ class AuthLogic public function getHome($systemId, $data) { - // 2025.10.30 临时处理 ====== start - if ($systemId == 1) { - if (in_array(1, $data['role_ids'])) { - return '/dashboard/console'; - } - if (count($data['role_ids']) == 1 && in_array(5, $data['role_ids'])) { - return '/dashboard/console/backoffice'; - } - if (count($data['role_ids']) == 1 && in_array(6, $data['role_ids'])) { - return '/dashboard/console/finance'; - } +// // 2025.10.30 临时处理 ====== start +// if ($systemId == 1) { +// if (in_array(1, $data['role_ids'])) { +// return '/dashboard/console'; +// } +// if (count($data['role_ids']) == 1 && in_array(5, $data['role_ids'])) { +// return '/dashboard/console/backoffice'; +// } +// if (count($data['role_ids']) == 1 && in_array(6, $data['role_ids'])) { +// return '/dashboard/console/finance'; +// } +// } +// // 2025.10.30 临时处理 ====== end +// +// $info = Resource::where('system_id', $systemId) +// ->where('is_home', 1) +// ->first(); + + $resources_id = (new UserDashboardRuleLogic)->getUserDashboard($data['uid']); + if(!empty($resources_id)){ + $info = Resource::where('system_id', $systemId) + ->where('id', $resources_id) + ->first(); } - // 2025.10.30 临时处理 ====== end - - $info = Resource::where('system_id', $systemId) - ->where('is_home', 1) - ->first(); if (!$info) { return '/dashboard/console';