Role.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace app\index\controller;
  3. use think\Controller;
  4. class Role extends Base
  5. {
  6. public function __construct()
  7. {
  8. parent::__construct();
  9. }
  10. public function index()
  11. {
  12. $this->label_role();
  13. return $this->label_fetch('role/index');
  14. }
  15. public function show()
  16. {
  17. $this->check_show();
  18. $this->label_role();
  19. return $this->label_fetch('role/show');
  20. }
  21. public function ajax_show()
  22. {
  23. $this->check_ajax();
  24. $this->check_show(1);
  25. $this->label_role();
  26. return $this->label_fetch('role/ajax_show');
  27. }
  28. public function search()
  29. {
  30. $param = mac_param_url();
  31. $this->check_search($param);
  32. $this->label_search($param);
  33. return $this->label_fetch('role/search');
  34. }
  35. public function ajax_search()
  36. {
  37. $param = mac_param_url();
  38. $this->check_ajax();
  39. $this->check_search($param,1);
  40. $this->label_search($param);
  41. return $this->label_fetch('role/ajax_search');
  42. }
  43. public function detail()
  44. {
  45. $info = $this->label_role_detail();
  46. return $this->label_fetch( mac_tpl_fetch('role',$info['role_tpl'],'detail') );
  47. }
  48. public function ajax_detail()
  49. {
  50. $this->check_ajax();
  51. $info = $this->label_role_detail();
  52. return $this->label_fetch('role/ajax_detail');
  53. }
  54. public function rss()
  55. {
  56. $info = $this->label_role_detail();
  57. return $this->label_fetch('role/rss');
  58. }
  59. }