PHPackages                             wuwei/logistics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wuwei/logistics

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wuwei/logistics
===============

查询快递物流信息

1.2(5y ago)06MITPHPPHP &gt;=7.0

Since Jan 7Pushed 5y agoCompare

[ Source](https://github.com/weizenghui/logistics)[ Packagist](https://packagist.org/packages/wuwei/logistics)[ RSS](/packages/wuwei-logistics/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (12)Used By (0)

 Logistics
===========

[](#-logistics-)

简单便捷查询运单快递信息

[![Build Status](https://camo.githubusercontent.com/ec5d72a04177e2ba5c2ee566f4b2f58148e67242bbc8b2362e4db48d86735bc6/68747470733a2f2f7472617669732d63692e6f72672f75756b3032302f6c6f676973746963732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/uuk020/logistics)[![StyleCI build status](https://camo.githubusercontent.com/07eaf5c2a81fc0cb39be96fa71d07de6979a6bcc710a3d8f10f3bff61af478d2/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136333038353639352f736869656c64)](https://camo.githubusercontent.com/07eaf5c2a81fc0cb39be96fa71d07de6979a6bcc710a3d8f10f3bff61af478d2/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136333038353639352f736869656c64)[![Latest Stable Version](https://camo.githubusercontent.com/0ddb9f7abb27dca2879e4af555c8c4de108366ab9b635ef7a6a473427d5d966b/68747470733a2f2f706f7365722e707567782e6f72672f77757765692f6c6f676973746963732f762f737461626c65)](https://packagist.org/packages/wuwei/logistics)[![Total Downloads](https://camo.githubusercontent.com/1660f8dd2a71c8d2684dc10a4ed4fa1157a7bceb4855fb5d7bd1e7796005ece5/68747470733a2f2f706f7365722e707567782e6f72672f77757765692f6c6f676973746963732f646f776e6c6f616473)](https://packagist.org/packages/wuwei/logistics)[![Latest Unstable Version](https://camo.githubusercontent.com/e923e2945c630c2c47c144e378332b8220f83a644abb4443f486f00bfe5300c2/68747470733a2f2f706f7365722e707567782e6f72672f77757765692f6c6f676973746963732f762f756e737461626c65)](https://packagist.org/packages/wuwei/logistics)[![License](https://camo.githubusercontent.com/e1719de7ca67bd89408240b15995e20d1ccbadc06803310217493da89f0389d3/68747470733a2f2f706f7365722e707567782e6f72672f77757765692f6c6f676973746963732f6c6963656e7365)](https://packagist.org/packages/wuwei/logistics)

### 支持查询接口平台

[](#支持查询接口平台)

平台次数是否需要快递公司编码[快递100](https://www.kuaidi100.com/openapi/applyapi.shtml)100单/天(免费)Y[快递鸟](http://www.kdniao.com/api-all)3000单/天(免费)Y[聚合数据](https://www.juhe.cn/docs/api/id/43)100次(首次申请)Y[极速数据](https://www.jisuapi.com/api/express)1000次(免费)N[数据智汇](http://www.shujuzhihui.cn/apiDetails?id=1867)100次(免费)N### 配置须知

[](#配置须知)

- 只有快递鸟申请后会有两个,一个是用户ID, 填入到app\_secret,另外一个则是api\_key, 填入app\_key, 其他则把申请的key填入到app\_key

### 环境需求

[](#环境需求)

- PHP &gt;= 7.0

### 安装

[](#安装)

```
$ composer require wuwei/logistics -vvv
```

### 使用

[](#使用)

```
use Wuwei\Logistics\Logistics;
$config = [
    'juhe' => ['app_key' => 'app_key', 'vip' => false],
    'shujuzhihui' => ['app_key' => 'app_key', 'vip' => false],
    'jisu' => ['app_key' => 'app_key', 'vip' => false],
    'kuaidibird' => ['app_key' => 'app_key', 'app_secret' =>  'app_secret', 'vip' =>
            false],
    'kuaidi100' => ['app_key' => '']
];
$logistics = new Logistics($config);
```

### 参数说明

[](#参数说明)

```
array query(string $code, $channels = ['kuaidi100'], string $company = '')
array queryByProxy(array $proxy, string $code, $channels = ['kuaidi100'], string $company = '')

```

- query 与 queryByProxy 返回数组结构是一样, 只是多了一个参数代理IP
- $proxy - 代理地址 结构: \['proxy' =&gt; '代理IP:代理端口'\]
- $code - 运单号
- $channel - 渠道名称, 可选参数,默认快递鸟.
- $company - 快递公司 具体看 SupportLogistics 文件

### 快递 100 接口获取物流信息 所有接口返回格式是统一

[](#快递-100-接口获取物流信息-所有接口返回格式是统一)

```
use Wuwei\Logistics\Logistics;
$config = [
    'juhe' => ['app_key' => 'app_key', 'vip' => false],
    'shujuzhihui' => ['app_key' => 'app_key', 'vip' => false],
    'jisu' => ['app_key' => 'app_key', 'vip' => false],
    'kuaidibird' => ['app_key' => 'app_key', 'app_secret' =>  'app_secret', 'vip' =>
            false],
    'kuaidi100' => ['app_key' => '']
];
$logistics = new Logistics($config);
$logistics->query('12313131231', ''); // 第二参数选填,可以为字符串或数组, 默认快递鸟
$logistics->query('12313131231', 'kuaidi100');
$logistics->query('12313131231', ['kuaidi100']);
```

示例:

```
[
   'kuaidi100' => [
       'channel' => 'kuaidi100',
       'status' => 'success',
       'result' => [
           [
               'status' => 200,
               'message'  => 'OK',
               'error_code' => 0,
               'data' => [
                   ['time' => '2019-01-09 12:11', 'description' => '仓库-已签收'],
                   ['time' => '2019-01-07 12:11', 'description' => '广东XX服务点'],
                   ['time' => '2019-01-06 12:11', 'description' => '广东XX转运中心']
               ],
               'logistics_company' => '申通快递',
               'logistics_bill_no' => '12312211'
           ],
           [
               'status' => 201,
               'message' => '快递公司参数异常：单号不存在或者已经过期',
               'error_code' => 0,
               'data' => '',
               'logistics_company' => '',
               'logistics_bill_no' => ''
           ]
       ]
   ]
]
```

### 多接口获取物流信息

[](#多接口获取物流信息)

```
use Wuwei\Logistics\Logistics;
$config = [
    'juhe' => ['app_key' => 'app_key', 'vip' => false],
    'shujuzhihui' => ['app_key' => 'app_key', 'vip' => false],
    'jisu' => ['app_key' => 'app_key', 'vip' => false],
    'kuaidibird' => ['app_key' => 'app_key', 'app_secret' =>  'app_secret', 'vip' =>
            false],
    'kuaidi100' => ['app_key' => '']
];
$logistics = new Logistics($config);
$logistics->query('12313131231');
$logistics->query('12313131231', ['kuaidi100', 'ickd']);
```

示例:

```
[
   'kuaidi100' => [
       'channel' => 'kuaidi100',
       'status' => 'success',
       'result' => [
           [
               'status' => 200,
               'message'  => 'OK',
               'error_code' => 0,
               'data' => [
                   ['time' => '2019-01-09 12:11', 'description' => '仓库-已签收'],
                   ['time' => '2019-01-07 12:11', 'description' => '广东XX服务点'],
                   ['time' => '2019-01-06 12:11', 'description' => '广东XX转运中心']
               ],
               'logistics_company' => '申通快递',
               'logistics_bill_no' => '12312211'
           ],
           [
               'status' => 201,
               'message' => '快递公司参数异常：单号不存在或者已经过期',
               'error_code' => 0,
               'data' => '',
               'logistics_company' => '',
               'logistics_bill_no' => ''
           ]
       ]
   ],
   'ickd' => [
       'channel' => 'ickd',
       'status' => 'success',
       'result' => [
           [
               'status' => 200,
               'message'  => 'OK',
               'error_code' => 0,
                'data' => [
                    ['time' => '2019-01-09 12:11', 'description' => '仓库-已签收'],
                    ['time' => '2019-01-07 12:11', 'description' => '广东XX服务点'],
                    ['time' => '2019-01-06 12:11', 'description' => '广东XX转运中心']
                ],
                'logistics_company' => '申通快递',
                'logistics_bill_no' => '12312211'
           ]
       ]
   ]
]
```

参考
--

[](#参考)

- [PHP 扩展包实战教程 - 从入门到发布](https://laravel-china.org/courses/creating-package)
- [高德开放平台接口的 PHP 天气信息组件(weather)](https://github.com/overtrue/weather)
- [满足你的多种发送需求的短信发送组件(easy-sms)](https://github.com/overtrue/easy-sms)

最后
--

[](#最后)

欢迎提出 issue 和 pull request

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 69.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~98 days

Recently: every ~139 days

Total

8

Last Release

2047d ago

Major Versions

v0.0.4 → 1.0.02019-06-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0e5580c2dd78f4ed4ba3f31f2f892d57cb11dfb881eb1623ca88e8f895b37f3?d=identicon)[wuwei\_will](/maintainers/wuwei_will)

---

Top Contributors

[![uuk020](https://avatars.githubusercontent.com/u/14903007?v=4)](https://github.com/uuk020 "uuk020 (44 commits)")[![weizenghui](https://avatars.githubusercontent.com/u/2328863?v=4)](https://github.com/weizenghui "weizenghui (14 commits)")[![netbuilding](https://avatars.githubusercontent.com/u/8249202?v=4)](https://github.com/netbuilding "netbuilding (1 commits)")[![almas-x](https://avatars.githubusercontent.com/u/9382335?v=4)](https://github.com/almas-x "almas-x (1 commits)")[![samnela](https://avatars.githubusercontent.com/u/1852108?v=4)](https://github.com/samnela "samnela (1 commits)")[![ramzeng](https://avatars.githubusercontent.com/u/38133602?v=4)](https://github.com/ramzeng "ramzeng (1 commits)")[![dacheng-gao](https://avatars.githubusercontent.com/u/13791720?v=4)](https://github.com/dacheng-gao "dacheng-gao (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wuwei-logistics/health.svg)

```
[![Health](https://phpackages.com/badges/wuwei-logistics/health.svg)](https://phpackages.com/packages/wuwei-logistics)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
