From 7f370a095d7844d303301fb2160cc6bdcc77936f Mon Sep 17 00:00:00 2001 From: Hanada Date: Thu, 19 Jun 2025 12:50:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BD=91=E5=AE=BFAPI?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#250)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 变更网宿check方法调用的API接口以避免产品未开通导致验证失败 * 兼容网宿CDN接口使用result作为失败返回值的场景 --- app/lib/deploy/wangsu.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/lib/deploy/wangsu.php b/app/lib/deploy/wangsu.php index f9cd555..6c63583 100644 --- a/app/lib/deploy/wangsu.php +++ b/app/lib/deploy/wangsu.php @@ -24,7 +24,7 @@ class wangsu implements DeployInterface public function check() { if (empty($this->username) || empty($this->apiKey)) throw new Exception('必填参数不能为空'); - $this->request('/cdn/certificates'); + $this->request('/api/ssl/certificate'); return true; } @@ -452,6 +452,9 @@ class wangsu implements DeployInterface } elseif (isset($result['message'])) { throw new Exception($result['message']); + } elseif (isset($result['result'])) { + throw new Exception($result['result']); + } else { throw new Exception('请求失败'); }