|
...
|
...
|
@@ -209,10 +209,21 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
$this->fail('获取项目数据失败');
|
|
|
|
}
|
|
|
|
$server_model = new ServerConfig();
|
|
|
|
$server_info = $server_model->read(['id'=>$project_info['serve_id']],'init_domain');
|
|
|
|
$server_info = $server_model->read(['id'=>$project_info['serve_id']],['init_domain', 'host']);
|
|
|
|
if($server_info === false){
|
|
|
|
$this->fail('获取服务器数据失败');
|
|
|
|
}
|
|
|
|
|
|
|
|
//域名是否都已经解析
|
|
|
|
if(!$this->check_cname($info['domain'], $server_info)){
|
|
|
|
$this->fail('域名' . $info['domain'] . '未解析至目标服务器');
|
|
|
|
}
|
|
|
|
foreach ($this->param['other_domain']??[] as $other_domain){
|
|
|
|
if(!$this->check_cname($other_domain, $server_info)){
|
|
|
|
$this->fail('域名' . $other_domain . '未解析至目标服务器');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//保存301跳转数据+其他域名
|
|
|
|
$data = [
|
|
|
|
'other_domain'=>json_encode($this->param['other_domain'] ?? []),
|
...
|
...
|
|