AliyunExpress.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace crmeb\services\express\storage;
  12. use crmeb\services\express\BaseExpress;
  13. use crmeb\services\HttpService;
  14. /**
  15. * Class AliyunExpress
  16. * @package crmeb\services\express\storage
  17. */
  18. class AliyunExpress extends BaseExpress
  19. {
  20. /**
  21. * @var string[]
  22. */
  23. protected static $api = [
  24. 'query' => 'https://wuliu.market.alicloudapi.com/kdi'
  25. ];
  26. /**
  27. * @param string $no
  28. * @param string $type
  29. * @return bool|mixed
  30. */
  31. public function query(string $no = '', string $type = '', string $appCode = '')
  32. {
  33. if (!$appCode) return false;
  34. $res = HttpService::getRequest(self::$api['query'], compact('no', 'type'), ['Authorization:APPCODE ' . $appCode]);
  35. return json_decode($res, true) ?: false;
  36. }
  37. public function open()
  38. {
  39. // TODO: Implement open() method.
  40. }
  41. public function dump($data)
  42. {
  43. // TODO: Implement dump() method.
  44. }
  45. public function temp(string $com)
  46. {
  47. // TODO: Implement temp() method.
  48. }
  49. }