|
|
@@ -50,7 +50,7 @@ class Kd100Service extends BaseService
|
|
|
* @param string $code 快递公司编号
|
|
|
* @return bool
|
|
|
*/
|
|
|
- public function query($no, $phone, $code)
|
|
|
+ public function query($no, $phone, $code,$to='')
|
|
|
{
|
|
|
if(empty($this->apiKey) || empty($this->apiCode)){
|
|
|
$this->error = '接口参数未配置';
|
|
|
@@ -68,8 +68,8 @@ class Kd100Service extends BaseService
|
|
|
'num' => $no, // 快递单号
|
|
|
'phone' => $phone, // 手机号
|
|
|
'from' => '', // 出发地城市
|
|
|
- 'to' => '', // 目的地城市
|
|
|
- 'resultv2' => 1, // 开启行政区域解析
|
|
|
+ 'to' => $to, // 目的地城市
|
|
|
+ 'resultv2' => $to?8:1, // 开启行政区域解析
|
|
|
'show' => '0', // 返回格式:0:json格式(默认),1:xml,2:html,3:text
|
|
|
'order' => 'desc', // 返回结果排序:desc降序(默认),asc 升序
|
|
|
'needCourierInfo'=> true // 是否返回快递员电话
|