Common.php 895 B

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