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.
 
 
 
 
 
 

57 lines
1.1 KiB

  1. <?php
  2. //ZYB工具类
  3. namespace common\util;
  4. class ZybBusUtil
  5. {
  6. private static $util = null;
  7. private $supplierId = 1835;
  8. /**
  9. * Des:通用方法 只是用一些通用方法
  10. * Name: util
  11. * @return ZybBusUtil
  12. * @author 倪宗锋
  13. */
  14. public static function util()
  15. {
  16. if (static::$util == null) {
  17. static::$util = new self();
  18. }
  19. return static::$util;
  20. }
  21. /**
  22. * Des:返回信息
  23. * Name: returnErr
  24. * @param $msg
  25. * @param $body
  26. * @param $status
  27. * @return string
  28. * @author 倪宗锋
  29. */
  30. public function re($msg = '', $status = '', $body = '')
  31. {
  32. if (empty($body)) {
  33. $body = (object) [];
  34. }
  35. $return = [
  36. "describe" => $msg,
  37. 'order' => $body,
  38. 'status' => $status
  39. ];
  40. \Yii::$app->response->format = 'json';
  41. \Yii::$app->response->data = $return;
  42. return;
  43. }
  44. /**
  45. * Des:获取渠道ID
  46. * Name: getSupplierId
  47. * @return string
  48. * @author 倪宗锋
  49. */
  50. public function getSupplierId(){
  51. return $this->supplierId;
  52. }
  53. }