From 7dbe36dac562aa6958eed825ebc8108a69362eed Mon Sep 17 00:00:00 2001 From: hdm Date: Thu, 2 Mar 2023 11:21:41 +0800 Subject: [PATCH] =?UTF-8?q?api=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/BaseController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/api/BaseController.php b/app/api/BaseController.php index 126d3d6..7fa0391 100644 --- a/app/api/BaseController.php +++ b/app/api/BaseController.php @@ -14,6 +14,7 @@ use think\exception\HttpResponseException; use think\facade\Request; use think\facade\Session; use think\facade\View; +use think\facade\Db; use think\Response; /** @@ -100,6 +101,8 @@ abstract class BaseController } else{ $this->uid = Session::get($session_admin); + $login_admin = Db::name('Admin')->where(['id' => $this->uid])->find(); + View::assign('login_admin', $login_admin); } } /**