|
...
|
...
|
@@ -366,6 +366,7 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
$this->fail('获取项目数据失败');
|
|
|
|
}
|
|
|
|
|
|
|
|
$custom_model = new CountryCustom();
|
|
|
|
if($this->param['is_create']){
|
|
|
|
//需要创建站点
|
|
|
|
$server_model = new ServerConfig();
|
|
...
|
...
|
@@ -383,6 +384,11 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
$this->fail('自定义域名填写错误');
|
|
|
|
}
|
|
|
|
$this->param['custom_domain'] = $domain_arr['host'];
|
|
|
|
//判断域名是否已经被使用
|
|
|
|
$has_info = $custom_model->read(['custom_domain'=>$this->param['custom_domain']]);
|
|
|
|
if($has_info && ($has_info['project_id'] != $project_id || $has_info['language_id'] != $this->param['language_id'])){
|
|
|
|
$this->fail('自定义域名已被使用');
|
|
|
|
}
|
|
|
|
if(!$this->check_cname($this->param['custom_domain'], $server_info)){
|
|
|
|
$this->fail('域名' . $this->param['custom_domain'] . '未解析至目标服务器');
|
|
|
|
}
|
|
...
|
...
|
@@ -392,7 +398,6 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
$this->param['custom_domain'] = str_replace('//','',$this->param['custom_domain']);
|
|
|
|
}
|
|
|
|
|
|
|
|
$custom_model = new CountryCustom();
|
|
|
|
$info = $custom_model->read(['project_id'=>$project_id,'language_id'=>$this->param['language_id']]);
|
|
|
|
if($info === false){
|
|
|
|
$this->param['project_id'] = $project_id;
|
...
|
...
|
|