默认地址

This commit is contained in:
2026-03-10 15:46:19 +08:00
parent e745d7f4b5
commit 455b5c63cd
+16
View File
@@ -14,6 +14,7 @@ use app\common\utils\Jwt;
use support\Redis;
use support\exception\BusinessException;
use support\Log;
use function Symfony\Component\String\b;
class AuthLogic
{
@@ -179,10 +180,23 @@ class AuthLogic
'role_wp' => $user->role_wp,
'name' => $user->name,
'login_type' => $data['login_type'],
'home' => $this->getHomePage($user),
// 'payload' => $payload,
];
}
/**
* 默认页
*/
private function getHomePage(User $user)
{
if($user->role>0){
return '/admin/publish/publish_list';
}else{
return '/admin/publish/publish_my_listpro';
}
}
/**
* 获取飞书用户信息
*/
@@ -221,6 +235,8 @@ class AuthLogic
'avatar'=>$userInfo['data']['avatar_url']??'',
]);
$data['role'] = $user['role'];
$data['role_wp'] = $user['role_wp'];
$data['home'] =$this->getHomePage($user);
return $userInfo['data'] + $data;
}