用户信息

This commit is contained in:
yaooo 2023-10-28 13:44:07 +08:00
parent c0f36c907e
commit 59c9c28dce
1 changed files with 7 additions and 0 deletions

View File

@ -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 = [];