Basics.php 665 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. *
  4. * @copyright ©2020 点小铺
  5. * @author hanj
  6. * @link: https://dyuit.com
  7. * Created by VSCode
  8. */
  9. namespace app\common\service;
  10. class Basics
  11. {
  12. // 错误信息
  13. protected $error;
  14. // 当前小程序id
  15. protected $wxappId;
  16. /**
  17. * 获取错误信息
  18. * @return mixed
  19. */
  20. public function getError()
  21. {
  22. return $this->error;
  23. }
  24. /**
  25. * 是否存在错误
  26. * @return bool
  27. */
  28. public function hasError()
  29. {
  30. return !empty($this->error);
  31. }
  32. public function setError($error)
  33. {
  34. $this->error = $error;
  35. return false;
  36. }
  37. }