Index.php 704 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\admin\controller;
  4. use app\admin\service\AuthService;
  5. use app\BaseController;
  6. use app\Request;
  7. use think\App;
  8. use think\facade\View;
  9. class Index extends BaseController
  10. {
  11. private $authService;
  12. public function __construct(App $app)
  13. {
  14. $this->authService = new AuthService();
  15. parent::__construct($app);
  16. }
  17. public function index(Request $request)
  18. {
  19. $adminId = 10000; //$request->param(['adminId']);
  20. $rules = $this->authService->loadRuleByAdminId($adminId);
  21. View::assign('rules',recursion($rules,0));
  22. return view();
  23. }
  24. public function home()
  25. {
  26. return view();
  27. }
  28. }