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.
 
 
 
 

38 lines
856 B

  1. <?php
  2. //Author:fuhc
  3. //Date:20160909
  4. //接口基类
  5. require_once __DIR__ . '../../BaseHotel.php';
  6. require_once __DIR__ . '../../Common/Function.php';
  7. class ApiBase extends BaseHotel
  8. {
  9. public $format; //接口数据类型
  10. public $login_user_id;
  11. function __construct()
  12. {
  13. parent::__construct();
  14. $this->format = "json";
  15. $this->login_user_id = getUserId();
  16. // $this->login_user_id = 1;
  17. if (!$this->login_user_id) {
  18. // echo array('code'=>'200','info'=>'wuquanxian');
  19. return false;
  20. }
  21. }
  22. function _get($key=''){
  23. return isset($_GET[$key])?$_GET[$key]:'';
  24. }
  25. function _post($key=''){
  26. return isset($_POST[$key])?$_POST[$key]:'';
  27. }
  28. function _request($key=''){
  29. return isset($_REQUEST[$key])?$_REQUEST[$key]:'';
  30. }
  31. }
  32. ?>