Commit ee8b1cbc authored by zcg's avatar zcg

快递服务封装

parent 3002f790
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/28
* Time: 10:23
*/
use internalApi\ucenter\Express;
require __DIR__.'/_init.php';
//Express::setDebug();
$info = Express::query('70191547363252','huitongkuaidi');
// $info = Member::getInfoByMobile('15395081586');
//$info = Member::getSyncByMobile('13000000002');
//$info = Member::getSyncByUid(514);
print_r($info);
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/30
* Time: 15:08
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
/**
* 用户中心消息服务
*
* @package internalApi\ucenter
*/
class Express extends Client
{
/**
* 获取物流信息
*
* @param string $nu 快递单号
* @param string $com 快递公司代码
* @return array
*/
public static function query($nu, $com)
{
return self::call('express.query', compact('nu', 'com'));
}
/**
* 获取支持的快递公司代码列表
*
* @param boolean $all false:只获取常用的,true:获取所有快递公司
* @return array
*/
public static function company($all=false)
{
return self::call('express.company', compact('all'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment