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