| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- declare (strict_types = 1);
- namespace app\admin\controller;
- use app\admin\service\AuthService;
- use app\BaseController;
- use app\Request;
- use think\App;
- use think\facade\View;
- class Index extends BaseController
- {
- private $authService;
- public function __construct(App $app)
- {
- $this->authService = new AuthService();
- parent::__construct($app);
- }
- public function index(Request $request)
- {
- $adminId = 10000; //$request->param(['adminId']);
- $rules = $this->authService->loadRuleByAdminId($adminId);
- View::assign('rules',recursion($rules,0));
- return view();
- }
- public function home()
- {
- return view();
- }
- }
|