diff --git a/app/api/controller/HomeIndex.php b/app/api/controller/HomeIndex.php index 8607376..bcf7b34 100644 --- a/app/api/controller/HomeIndex.php +++ b/app/api/controller/HomeIndex.php @@ -24,6 +24,13 @@ class HomeIndex extends ApiController Auth::class => ['except' => []] ]; + public function userinfo() + { + $uid = JWT_UID; + $userInfo = Db::name('Admin')->where(['id' => $uid])->field(['id', 'username', 'name', 'email', 'mobile', 'sex', 'nickname', 'thumb', 'did', 'position_id', 'desc', 'entry_time'])->find(); + $this->apiSuccess('获取成功', $userInfo); + } + public function data_total() { $total = [];