From b63343e068f12270c5c9f9e0cb2ca91b5e032703 Mon Sep 17 00:00:00 2001 From: Chaim Date: Thu, 7 May 2020 13:43:05 +0800 Subject: [PATCH] - update composer --- composer.json | 1 - src/Api.php | 2 +- src/BaseBt.php | 13 +++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index edaadba..098022a 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "ext-json": "*", "ext-curl": "*", "topthink/framework": "^6.0.0", - "liguangchun/curl": "^1.0", "liguangchun/think-library": "6.x-dev" }, "autoload": { diff --git a/src/Api.php b/src/Api.php index 4dc8b40..3c325ad 100644 --- a/src/Api.php +++ b/src/Api.php @@ -16,7 +16,7 @@ namespace DtApp\Think\Bt; -use DtApp\Curl\CurlException; +use DtApp\ThinkLibrary\exception\CurlException; /** * 接口 diff --git a/src/BaseBt.php b/src/BaseBt.php index adf0bf3..ac4cc0e 100644 --- a/src/BaseBt.php +++ b/src/BaseBt.php @@ -16,8 +16,8 @@ namespace DtApp\Think\Bt; -use DtApp\Curl\BtCn; -use DtApp\Curl\CurlException; +use DtApp\ThinkLibrary\exception\CurlException; +use DtApp\ThinkLibrary\service\curl\BtService; /** * 中间件 @@ -72,8 +72,13 @@ class BaseBt $fp = fopen($cookie_file, 'w+'); fclose($fp); } - $BtCn = new BtCn($config); - return $BtCn->httpPost($url, $data, $cookie_file, 60, $is_json); + return BtService::instance() + ->panel($this->config->get('panel')) + ->key($this->config->get('key')) + ->url($url) + ->cookie($cookie_file) + ->data($data) + ->toArray($is_json); } /** -- Gitee