Files
huangjingfen/pro_v3.5.1/crmeb/services/ExpressService.php

24 lines
694 B
PHP
Raw Normal View History

<?php
// +----------------------------------------------------------------------
// | Author: ScottPan Team
// +----------------------------------------------------------------------
namespace crmeb\services;
class ExpressService
{
protected static $api = [
'query' => 'https://wuliu.market.alicloudapi.com/kdi'
];
public static function query($no, $type = '')
{
$appCode = sys_config('system_express_app_code');
if (!$appCode) return false;
$res = HttpService::getRequest(self::$api['query'], compact('no', 'type'), ['Authorization:APPCODE ' . $appCode]);
$result = json_decode($res, true) ?: false;
return $result;
}
}