无修改

This commit is contained in:
2026-05-27 10:38:51 +08:00
parent d332721f5c
commit bcae1cd06e

View File

@@ -14,8 +14,8 @@ class AuthService
public function login(string $username, string $password)
{
$user = User::with(['company'])
->where('username', $username)
->find();
->where('username', $username)
->find();
@@ -29,6 +29,7 @@ class AuthService
$userInfo = [
'id' => $user['id'], // 用户ID
'company_name' => $user['company']['company_name'], // 所属公司名称
'username' => $user['username'],
'role' => $user['role'],
@@ -37,6 +38,5 @@ class AuthService
Session::set('user_info', $user);
return $userInfo;
}
}