Actor.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. namespace app\index\controller;
  3. use think\Controller;
  4. class Actor extends Base
  5. {
  6. public function __construct()
  7. {
  8. parent::__construct();
  9. }
  10. public function index()
  11. {
  12. $info = $this->label_actor();
  13. return $this->label_fetch('actor/index');
  14. }
  15. public function type()
  16. {
  17. $info = $this->label_type();
  18. return $this->label_fetch( mac_tpl_fetch('actor',$info['type_tpl'],'type') );
  19. }
  20. public function show()
  21. {
  22. $this->check_show();
  23. $param = mac_param_url();
  24. $type_id_specified = 0;
  25. if (empty($param['id'])) {
  26. $default_actor_type = model('Type')->where(['type_mid' => 8, 'type_status' => 1])->find();
  27. $type_id_specified = isset($default_actor_type->type_id) ? $default_actor_type->type_id : 0;
  28. }
  29. $info = $this->label_type(0, $type_id_specified);
  30. return $this->label_fetch( mac_tpl_fetch('actor',$info['type_tpl_list'],'show') );
  31. }
  32. public function ajax_show()
  33. {
  34. $this->check_ajax();
  35. $this->check_show(1);
  36. $info = $this->label_type();
  37. return $this->label_fetch('actor/ajax_show');
  38. }
  39. public function search()
  40. {
  41. $param = mac_param_url();
  42. $this->check_search($param);
  43. $this->label_search($param);
  44. return $this->label_fetch('actor/search');
  45. }
  46. public function ajax_search()
  47. {
  48. $param = mac_param_url();
  49. $this->check_ajax();
  50. $this->check_search($param,1);
  51. $this->label_search($param);
  52. return $this->label_fetch('actor/ajax_search');
  53. }
  54. public function detail()
  55. {
  56. $info = $this->label_actor_detail();
  57. return $this->label_fetch( mac_tpl_fetch('actor',$info['actor_tpl'],'detail') );
  58. }
  59. public function ajax_detail()
  60. {
  61. $this->check_ajax();
  62. $info = $this->label_actor_detail();
  63. return $this->label_fetch('actor/ajax_detail');
  64. }
  65. public function rss()
  66. {
  67. $info = $this->label_actor_detail();
  68. return $this->label_fetch('actor/rss');
  69. }
  70. }