From 06a264ff2157dd0a811020e1050a545d0cbf0c22 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Fri, 5 Dec 2025 16:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8E=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/AuthLogic.php | 39 ++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 16 deletions(-) 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';