Common.php 821 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\constant\CommonConstant;
  4. use app\common\constant\EvectionConstant;
  5. use hg\apidoc\annotation as Apidoc;
  6. /**
  7. * @Apidoc\Title("公用")
  8. * @Apidoc\Group("api")
  9. * @Apidoc\Sort("0")
  10. */
  11. class Common extends Base
  12. {
  13. public function initialize()
  14. {
  15. parent::initialize();
  16. }
  17. /**
  18. * 模块列表
  19. *
  20. * @Apidoc\Method("POST")
  21. */
  22. public function get_module_list()
  23. {
  24. $this->success('模块列表', get_one_two_array(CommonConstant::get_module_list(), 'id', 'name'));
  25. }
  26. /**
  27. * 出差类型列表
  28. *
  29. * @Apidoc\Method("POST")
  30. */
  31. public function get_evection_list()
  32. {
  33. $this->success('出差类型列表', get_one_two_array(EvectionConstant::get_type_list(), 'id', 'name'));
  34. }
  35. }