You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

53 lines
828 B

  1. <?php
  2. //Author:fuhc
  3. //Date:20160919
  4. //Demo
  5. require_once "Api/ApiBase.php";
  6. require_once "Lib/Action/TEST.class.php";
  7. class TESTAPI extends ApiBase{
  8. function __construct(){
  9. }
  10. function outJson(){
  11. $op = $this->_get('op');
  12. if($op=='555'){
  13. $data=$this->getDictTypeList();
  14. echo json_encode($data);
  15. }
  16. }
  17. function getDictTypeList(){
  18. $test = new TEST;
  19. $dict_type_list=$test->getDictTypeList();
  20. $data=array();
  21. $data['code']="0";
  22. $data['info']="";
  23. if($dict_type_list['code']!="0"){
  24. $data['code']=$dict_type_list['code'];
  25. $data['info']=$dict_type_list['info'];
  26. }
  27. $data['dict_type_list_api']=$dict_type_list['dict_type_list'];
  28. return $data;
  29. }
  30. }
  31. $test_api = new TESTAPI;
  32. $test_api->outJson();
  33. //$data=$test_api->getDictTypeList();
  34. //echo json_encode($data);
  35. ?>