|
...
|
...
|
@@ -9,6 +9,7 @@ use App\Models\Domain\DomainCreateTask; |
|
|
|
use App\Models\Domain\DomainInfo;
|
|
|
|
use App\Models\Domain\DomainRedirectTask;
|
|
|
|
use App\Models\Project\CountryCustom;
|
|
|
|
use App\Models\Project\DeployBuild;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
|
|
|
|
class DomainInfoLogic extends BaseLogic
|
|
...
|
...
|
@@ -169,7 +170,7 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
}
|
|
|
|
if($serversIpInfo['servers_id'] == ServerConfig::SELF_SITE_ID){
|
|
|
|
$this->model->edit(['amp_status' => $this->param['amp_status'] ?? 0],['id'=>$this->param['id']]);
|
|
|
|
$this->fail('自建站服务器无法生成站点');
|
|
|
|
$this->fail('自建站服务器无需生成站点');
|
|
|
|
}
|
|
|
|
//域名是否都已经解析
|
|
|
|
if(!check_domain_record($info['domain'], $serversIpInfo)){
|
|
...
|
...
|
@@ -242,6 +243,14 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//小语种为二级目录的站点,强制跳转https
|
|
|
|
$is_https = 0;
|
|
|
|
$buildModel = new DeployBuild();
|
|
|
|
$build_info = $buildModel->read(['project_id' => $info['project_id']], ['linking_format']);
|
|
|
|
if ($build_info && $build_info['linking_format'] == 1) {
|
|
|
|
$is_https = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
//保存301跳转数据+其他域名
|
|
|
|
$data = [
|
|
|
|
'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])),
|
|
...
|
...
|
@@ -249,7 +258,7 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
'type'=>$this->param['type'],
|
|
|
|
'private_key' => $this->param['key'] ?? '',
|
|
|
|
'private_cert' => $this->param['cert'] ?? '',
|
|
|
|
'is_https' => $this->param['is_https'] ?? 0,
|
|
|
|
'is_https' => $is_https,
|
|
|
|
'amp_status' => $this->param['amp_status'] ?? 0,
|
|
|
|
'amp_type' => $this->param['amp_type'] ?? 0,
|
|
|
|
'amp_extend_config'=>json_encode($amp_extend_config),
|
...
|
...
|
|