diff --git a/CHANGELOG.md b/CHANGELOG.md index aeaef0757f3ffa579e638eb517e5e53bd43fe9ba..c8e9d6a2da4fd98e9fe527d0da5c2376628a7a16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v6.0.122 / 2020-11-28 +- 增加订单侠开放平台接口 + ## v6.0.121 / 2020-11-12 - 修复缴费平台接口 diff --git a/composer.json b/composer.json index b77c77d3bc026b9626229150f6f059875ac3a0b6..513253377db52df42944fba48dc96a11e8d85fed 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "qcloud/cos-sdk-v5": "^2.0", "qiniu/php-sdk": "^7.2", "upyun/sdk": "^3.4", - "phpoffice/phpspreadsheet": "1.12.0" + "phpoffice/phpspreadsheet": "^1.14" }, "require-dev": { "symfony/var-dumper": "^4.2" diff --git a/src/common.php b/src/common.php index f5aae31370fb9371cf15e9de122beca65f8267e6..50e2f7f57c76fc1fa4e4ae5eeff506eff3efb0bb 100644 --- a/src/common.php +++ b/src/common.php @@ -25,7 +25,7 @@ use DtApp\ThinkLibrary\service\SystemService; /** * 定义当前版本 */ -const VERSION = '6.0.121'; +const VERSION = '6.0.122'; if (!function_exists('get_ip_info')) { /** diff --git a/src/service/dingdanxia/DingDanXiaService.php b/src/service/dingdanxia/DingDanXiaService.php new file mode 100644 index 0000000000000000000000000000000000000000..a5a4df39f347ea2e8c0e05c05cfea15eef01e55d --- /dev/null +++ b/src/service/dingdanxia/DingDanXiaService.php @@ -0,0 +1,108 @@ +app_key = $appKey; + return $this; + } + + /** + * 自定义接口 + * @param string $method + * @return $this + */ + public function setMethod($method = ''): self + { + $this->method = $method; + return $this; + } + + /** + * 请求参数 + * @param array $param + * @return $this + */ + public function param(array $param): self + { + $this->param = $param; + return $this; + } + + /** + * 获取配置信息 + * @return $this + */ + private function getConfig(): self + { + $this->app_key = config('dtapp.dingdanxia.app_key'); + return $this; + } + + /** + * 返回Array + * @return array|mixed + * @throws DtaException + */ + public function toArray() + { + //首先检测是否支持curl + if (!extension_loaded("curl")) { + throw new HttpException(404, '请开启curl模块!'); + } + if (empty($this->app_key)) { + $this->getConfig(); + } + if (empty($this->method)) { + throw new DtaException('请检查接口'); + } + $this->output = HttpService::instance() + ->url($this->method) + ->data($this->param) + ->post() + ->toArray(); + return $this->output; + } +} \ No newline at end of file