Merge branch 'feature/merge' into develop

This commit is contained in:
2025-12-05 16:27:32 +08:00
+23 -16
View File
@@ -539,23 +539,30 @@ class AuthLogic
public function getHome($systemId, $data) public function getHome($systemId, $data)
{ {
// 2025.10.30 临时处理 ====== start // // 2025.10.30 临时处理 ====== start
if ($systemId == 1) { // if ($systemId == 1) {
if (in_array(1, $data['role_ids'])) { // if (in_array(1, $data['role_ids'])) {
return '/dashboard/console'; // return '/dashboard/console';
} // }
if (count($data['role_ids']) == 1 && in_array(5, $data['role_ids'])) { // if (count($data['role_ids']) == 1 && in_array(5, $data['role_ids'])) {
return '/dashboard/console/backoffice'; // return '/dashboard/console/backoffice';
} // }
if (count($data['role_ids']) == 1 && in_array(6, $data['role_ids'])) { // if (count($data['role_ids']) == 1 && in_array(6, $data['role_ids'])) {
return '/dashboard/console/finance'; // 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) { if (!$info) {
return '/dashboard/console'; return '/dashboard/console';