From 5e9b5e684c4f25406b0763cfc2bfd7cd0a84496f Mon Sep 17 00:00:00 2001 From: Chaim Date: Thu, 9 Jul 2020 14:54:50 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=88=A0=E9=99=A4=E7=BD=91=E6=98=93?= =?UTF-8?q?=E4=BA=91=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 9 +++ composer.json | 4 +- src/common.php | 2 +- src/config.php | 11 ---- src/service/netease/NosService.php | 90 ------------------------------ 5 files changed, 11 insertions(+), 105 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 src/service/netease/NosService.php diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4f08ff9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +## v6.0.72 / 2020-07-09 +- 删除网易云服务 + +## v6.0.71 / 2020-07-09 +- 更新请求门面 + +## v6.0.70 / 2020-07-08 +- 更新联盟 +- 更新数据库 diff --git a/composer.json b/composer.json index 7404d7f..74886a6 100644 --- a/composer.json +++ b/composer.json @@ -41,9 +41,7 @@ "baidubce/bce-sdk-php": "^0.8.22", "qcloud/cos-sdk-v5": "^2.0", "qiniu/php-sdk": "^7.2", - "upyun/sdk": "^3.4", - "netease/nos-php-sdk": "^1.0", - "aws/aws-sdk-php": "^3.142" + "upyun/sdk": "^3.4" }, "require-dev": { "symfony/var-dumper": "^4.2" diff --git a/src/common.php b/src/common.php index b51226a..7b4a99b 100644 --- a/src/common.php +++ b/src/common.php @@ -25,7 +25,7 @@ use think\db\exception\ModelNotFoundException; /** * 定义当前版本 */ -const VERSION = '6.0.71'; +const VERSION = '6.0.72'; if (!function_exists('get_ip_info')) { diff --git a/src/config.php b/src/config.php index 9c38279..57547e9 100644 --- a/src/config.php +++ b/src/config.php @@ -176,15 +176,4 @@ return [ 'url' => '', ] ], - // 网易云 - 'netease' => [ - // 云存储 - 'ks3' => [ - 'access_key_id' => '', - 'access_key_secret' => '', - 'endpoint' => '', - 'bucket' => '', - 'url' => '', - ] - ], ]; diff --git a/src/service/netease/NosService.php b/src/service/netease/NosService.php deleted file mode 100644 index c76b24c..0000000 --- a/src/service/netease/NosService.php +++ /dev/null @@ -1,90 +0,0 @@ -accessKeyId = $accessKeyId; - return $this; - } - - public function accessKeySecret(string $accessKeySecret) - { - $this->accessKeySecret = $accessKeySecret; - return $this; - } - - public function endpoint(string $endpoint) - { - $this->endpoint = $endpoint; - return $this; - } - - public function bucket(string $bucket) - { - $this->bucket = $bucket; - return $this; - } - - /** - * 获取配置信息 - * @return $this - */ - private function getConfig() - { - $this->accessKeyId = $this->app->config->get('dtapp.netease.nos.access_key_id'); - $this->accessKeySecret = $this->app->config->get('dtapp.netease.nos.access_key_secret'); - $this->endpoint = $this->app->config->get('dtapp.netease.nos.endpoint'); - $this->bucket = $this->app->config->get('dtapp.netease.nos.bucket'); - return $this; - } - - /** - * 上传文件 - * @param string $object - * @param string $filePath - * @return bool|string - */ - public function upload(string $object, string $filePath) - { - if (empty($this->accessKeyId)) $this->getConfig(); - if (empty($this->accessKeySecret)) $this->getConfig(); - if (empty($this->endpoint)) $this->getConfig(); - try { - $nosClient = new NosClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint); - if (empty($this->bucket)) $this->getConfig(); - $nosClient->uploadFile($this->bucket, $object, $filePath); - return $this->app->config->get('dtapp.netease.nos.url') . $object; - } catch (NosException $e) { - return false; - } - } -}