39 lines
804 B
PHP
39 lines
804 B
PHP
<?php
|
|
/**
|
|
* Author: ykxiao
|
|
* Date: 2025/7/11
|
|
* Time: 下午7:05
|
|
* Description:
|
|
*
|
|
* (c) ykxiao <yk_9001@hotmail.com>
|
|
*
|
|
* This source file is subject to the MIT license that is bundled
|
|
* with this source code in the file LICENSE.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Service\PermissionService;
|
|
use Exception;
|
|
use Hyperf\Di\Annotation\Inject;
|
|
use Hyperf\HttpMessage\Server\Response;
|
|
|
|
class SystemController extends AbstractController
|
|
{
|
|
#[Inject]
|
|
protected PermissionService $permissionService;
|
|
|
|
/**
|
|
* 菜单列表
|
|
* @throws Exception
|
|
*/
|
|
public function menuList(): Response
|
|
{
|
|
$user = $this->user();
|
|
$menu = $this->permissionService->getMenuByUserType($user);
|
|
|
|
return $this->apiResponse->success($menu);
|
|
}
|
|
} |