a6f2284f51
# Conflicts: # app/common/controller/AuthController.php # app/common/logic/AuthLogic.php # app/common/model/User.php # app/controller/IndexController.php # app/functions.php # app/middleware/AuthCheck.php # app/view/index/qrcode.html # composer.json # composer.lock # config/middleware.php # config/route.php # config/whitelist.php
25 lines
516 B
PHP
25 lines
516 B
PHP
<?php
|
|
|
|
namespace app\common\controller;
|
|
|
|
use support\Request;
|
|
use app\common\service\UserService;
|
|
|
|
class UserController extends BaseController
|
|
{
|
|
|
|
/**
|
|
* 用户信息
|
|
*/
|
|
public function info(Request $request)
|
|
{
|
|
try {
|
|
$uid = $request->user->uid;
|
|
$result = (new UserService())->getUserInfo($uid);
|
|
return $this->success($result, '获取用户信息');
|
|
} catch (\Throwable $e) {
|
|
return $this->error($e->getMessage());
|
|
}
|
|
}
|
|
|
|
} |