|
...
|
...
|
@@ -38,7 +38,6 @@ class EditCustomDomainBt implements ShouldQueue |
|
|
|
*/
|
|
|
|
public function handle()
|
|
|
|
{
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('生成证书---开始', true) . PHP_EOL, FILE_APPEND);
|
|
|
|
//获取域名数据
|
|
|
|
$domain_model = new CountryCustom();
|
|
|
|
$domain_info = $domain_model->read(['id' => $this->domain_id]);
|
|
...
|
...
|
@@ -68,7 +67,6 @@ class EditCustomDomainBt implements ShouldQueue |
|
|
|
'other_domain' => [],
|
|
|
|
'is_https' => 1
|
|
|
|
];
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('生成证书--参数:'.json_encode($api_param), true) . PHP_EOL, FILE_APPEND);
|
|
|
|
} else {
|
|
|
|
$api_url = 'http://' . $server_info['init_domain'] . '/api/applySsl';
|
|
|
|
$api_param = [
|
|
...
|
...
|
@@ -77,11 +75,11 @@ class EditCustomDomainBt implements ShouldQueue |
|
|
|
'other_domain' => [],
|
|
|
|
'is_https' => 1
|
|
|
|
];
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('生成证书--参数:'.json_encode($api_param), true) . PHP_EOL, FILE_APPEND);
|
|
|
|
}
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('生成ssl--'.json_encode($api_param), true) . PHP_EOL, FILE_APPEND);
|
|
|
|
try {
|
|
|
|
$rs = HttpUtils::get($api_url, $api_param);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('请求接口返回数据:'.$rs, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('生成ssl--'.$rs, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$rs = json_decode($rs, true);
|
|
|
|
if (isset($rs['status']) && $rs['status'] == 200) {
|
|
|
|
$this->output($domain_info['custom_domain'] . ':站点编辑成功');
|
|
...
|
...
|
@@ -89,7 +87,6 @@ class EditCustomDomainBt implements ShouldQueue |
|
|
|
$this->output($domain_info['custom_domain'] . ':站点编辑失败,原因:' . ($rs['message'] ?? ''));
|
|
|
|
}
|
|
|
|
} catch (\Exception | GuzzleException $e) {
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('错误情况打印:'.$rs, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->output($domain_info['custom_domain'] . ':站点编辑失败,原因:' . $e->getMessage());
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|