作者 赵彬吉
... ... @@ -126,14 +126,19 @@ class NoticeController extends BaseController
return $this->error('other_domain参数必须为数组');
}
$origin_array = parse_url($origin_domain);
$origin_domain = $origin_array['host'] ?? '';
if (empty($origin_domain)) {
return $this->error('origin_domain参数不能为空');
}
$target_array = parse_url($target_domain);
$target_domain = $target_array['host'] ?? '';
if (empty($target_domain)) {
return $this->error('target_domain参数不能为空');
}
if(!check_domain_record($origin_domain,['domain'=>'','ip'=>DomainInfo::SERVER_IP_301])){
return $this->error($origin_domain . ' 未解析至 ' . DomainInfo::SERVER_IP_301);
}
... ...
... ... @@ -62,10 +62,8 @@ class SyncService
];
list($code, $result) = $this->curlRequest($url, $data);
Log::info('同步收件信息至表单系统: 项目ID:' . $project_id . ', data: ' . var_export($data, true) . ', result: ' . $result);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
return true;
} catch (\Exception $e) {
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($e->getMessage(), true) . PHP_EOL, FILE_APPEND);
Log::info('同步收件信息至表单系统: 项目ID:' . $project_id . ', error: ' . $e->getMessage());
return false;
}
... ...