From 455b5c63cd33dcf83fcb5a53074fdddacd764d51 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Tue, 10 Mar 2026 15:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/AuthLogic.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/common/logic/AuthLogic.php b/app/common/logic/AuthLogic.php index cce2ecb..f324b4a 100644 --- a/app/common/logic/AuthLogic.php +++ b/app/common/logic/AuthLogic.php @@ -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; }