BaseExpress.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace crmeb\basic;
  12. use crmeb\services\AccessTokenServeService;
  13. use crmeb\services\HttpService;
  14. use think\exception\ValidateException;
  15. use think\facade\Config;
  16. use crmeb\services\CacheService;
  17. /**
  18. * Class BaseExpress
  19. * @package crmeb\basic
  20. */
  21. abstract class BaseExpress extends BaseStorage
  22. {
  23. /**
  24. * access_token
  25. * @var null
  26. */
  27. protected $accessToken = NULL;
  28. public function __construct(string $name, AccessTokenServeService $accessTokenServeService, string $configFile)
  29. {
  30. parent::__construct($name, [], $configFile);
  31. $this->accessToken = $accessTokenServeService;
  32. }
  33. /**
  34. * 初始化
  35. * @param array $config
  36. * @return mixed|void
  37. */
  38. protected function initialize(array $config = [])
  39. {
  40. // parent::initialize($config);
  41. }
  42. /**
  43. * 开通服务
  44. * @return mixed
  45. */
  46. abstract public function open();
  47. /**物流追踪
  48. * @return mixed
  49. */
  50. abstract public function query(string $num, string $com = '');
  51. /**电子面单
  52. * @return mixed
  53. */
  54. abstract public function dump($data);
  55. /**快递公司
  56. * @return mixed
  57. */
  58. //abstract public function express($type, $page, $limit);
  59. /**面单模板
  60. * @return mixed
  61. */
  62. abstract public function temp(string $com);
  63. }