|
@@ -33,6 +33,21 @@ class Kuaidi extends Controller
|
|
|
return $this->renderSuccess(compact('list'));
|
|
|
}
|
|
|
|
|
|
+ public function dynamic(){
|
|
|
+ $arg = $this->request->param();
|
|
|
+ // 获取快递100配置项
|
|
|
+ // 实例化快递100类
|
|
|
+ $config = SettingModel::getItem(SettingEnum::DELIVERY);
|
|
|
+ if (empty($config['kuaidi100']['customer']) || empty($config['kuaidi100']['key'])) {
|
|
|
+ throwError('请先到后台-设置-配送方式 补充物流查询API配置');
|
|
|
+ }
|
|
|
+ // 实例化快递100类
|
|
|
+ $Kuaidi100 = new \app\common\model\Express($config['kuaidi100']);
|
|
|
+ // 请求订阅接口
|
|
|
+ $list = $Kuaidi100->dynamic($arg['name'],$arg['code'] ?? 1,$arg['no']);
|
|
|
+ return $this->renderSuccess(compact('list'));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 快递推送回调接口
|
|
|
* @return array
|