作者 lyh

gx

@@ -305,6 +305,7 @@ class DomainInfoLogic extends BaseLogic @@ -305,6 +305,7 @@ class DomainInfoLogic extends BaseLogic
305 ]; 305 ];
306 $this->model->edit($data,['id'=>$this->param['id']]); 306 $this->model->edit($data,['id'=>$this->param['id']]);
307 //主站生成证书 307 //主站生成证书
  308 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export('是否进入', true) . PHP_EOL, FILE_APPEND);
308 EditDomainBt::dispatch($this->param['id']); 309 EditDomainBt::dispatch($this->param['id']);
309 // $this->setDomainSsl($server_info['init_domain'],$info['domain'],$this->param['extend_config'] ?? [],$this->param['other_domain'] ?? [],$this->param['is_https'] ?? 0); 310 // $this->setDomainSsl($server_info['init_domain'],$info['domain'],$this->param['extend_config'] ?? [],$this->param['other_domain'] ?? [],$this->param['is_https'] ?? 0);
310 311
@@ -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