Base.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: qisse
  5. * Date: 2017/6/7
  6. * Time: 7:36
  7. */
  8. /**
  9. * @apiDefine CreateUserError
  10. * @apiVersion 0.2.0
  11. *
  12. * @apiError code 错误标示
  13. * @apiError msg 错误信息
  14. *
  15. * @apiErrorExample 返回格式举例:
  16. * {
  17. * "code": 400,
  18. * "msg": "没找到接口",
  19. * }
  20. */
  21. namespace app\master\logic;
  22. use app\core\exception\AppException;
  23. use think\Config;
  24. use think\Request;
  25. class Base
  26. {
  27. protected $master;
  28. protected $app;
  29. protected $data;
  30. protected $platform;
  31. protected $request;
  32. public function __construct(Request $request) {
  33. $this->request = $request;
  34. $this->master = isset($request->master) ? $request->master : null;
  35. $this->data = isset($request->data) ? $request->data : [];
  36. $this->app = isset($request->app) ? $request->app : [];
  37. $this->platform = Config::get('platform.default_check_gateway');
  38. $this->_initialize();
  39. }
  40. public function __call($name, $arguments)
  41. {
  42. // TODO: Implement __call() method.
  43. }
  44. /*public function checkMember($memberID = '') {
  45. if($this->member['id'] != $memberID) {
  46. throw new AppException(-7778, '没有权限');
  47. }
  48. }*/
  49. }