作者 刘锟

update

... ... @@ -13,7 +13,6 @@ use App\Utils\HttpUtils;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Http;
use Symfony\Component\Process\Process;
class DomainInfoLogic extends BaseLogic
... ... @@ -181,19 +180,18 @@ class DomainInfoLogic extends BaseLogic
'is_https' => $is_https
];
}
// try {
// $rs = HttpUtils::get($api_url, $api_param);
// $rs = json_decode($rs, true);
// if(isset($rs['status']) && $rs['status'] == 200){
// return $this->success();
// }else{
// $this->fail($rs['message']??'');
// }
// } catch (\Exception | GuzzleException $e) {
// errorLog('创建站点', $api_param, $e);
// $this->fail('编辑证书失败');
// }
Http::get($api_url, $api_param);
try {
$rs = HttpUtils::get($api_url, $api_param);
$rs = json_decode($rs, true);
if(isset($rs['status']) && $rs['status'] == 200){
return $this->success();
}else{
$this->fail($rs['message']??'');
}
} catch (\Exception | GuzzleException $e) {
errorLog('创建站点', $api_param, $e);
$this->fail('编辑证书失败');
}
return $this->success();
}
... ... @@ -224,20 +222,18 @@ class DomainInfoLogic extends BaseLogic
'cert' => $this->param['amp_cert']??''
];
// try {
// Http::get($api_url, $api_param);
// $rs = HttpUtils::get($api_url, $api_param);
// $rs = json_decode($rs, true);
// if(isset($rs['status']) && $rs['status'] == 200){
// return $this->success();
// }else{
// $this->fail($rs['message']??'');
// }
// } catch (\Exception | GuzzleException $e) {
// errorLog('创建AMP站点', $api_param, $e);
// $this->fail('编辑AMP站点证书失败');
// }
Http::get($api_url, $api_param);
try {
$rs = HttpUtils::get($api_url, $api_param);
$rs = json_decode($rs, true);
if(isset($rs['status']) && $rs['status'] == 200){
return $this->success();
}else{
$this->fail($rs['message']??'');
}
} catch (\Exception | GuzzleException $e) {
errorLog('创建AMP站点', $api_param, $e);
$this->fail('编辑AMP站点证书失败');
}
return $this->success();
}
... ...