合并分支 'akun' 到 'master'
Akun 查看合并请求 !1371
正在显示
1 个修改的文件
包含
11 行增加
和
2 行删除
| @@ -9,6 +9,7 @@ use App\Models\Domain\DomainCreateTask; | @@ -9,6 +9,7 @@ use App\Models\Domain\DomainCreateTask; | ||
| 9 | use App\Models\Domain\DomainInfo; | 9 | use App\Models\Domain\DomainInfo; |
| 10 | use App\Models\Domain\DomainRedirectTask; | 10 | use App\Models\Domain\DomainRedirectTask; |
| 11 | use App\Models\Project\CountryCustom; | 11 | use App\Models\Project\CountryCustom; |
| 12 | +use App\Models\Project\DeployBuild; | ||
| 12 | use App\Models\Project\Project; | 13 | use App\Models\Project\Project; |
| 13 | 14 | ||
| 14 | class DomainInfoLogic extends BaseLogic | 15 | class DomainInfoLogic extends BaseLogic |
| @@ -169,7 +170,7 @@ class DomainInfoLogic extends BaseLogic | @@ -169,7 +170,7 @@ class DomainInfoLogic extends BaseLogic | ||
| 169 | } | 170 | } |
| 170 | if($serversIpInfo['servers_id'] == ServerConfig::SELF_SITE_ID){ | 171 | if($serversIpInfo['servers_id'] == ServerConfig::SELF_SITE_ID){ |
| 171 | $this->model->edit(['amp_status' => $this->param['amp_status'] ?? 0],['id'=>$this->param['id']]); | 172 | $this->model->edit(['amp_status' => $this->param['amp_status'] ?? 0],['id'=>$this->param['id']]); |
| 172 | - $this->fail('自建站服务器无法生成站点'); | 173 | + $this->fail('自建站服务器无需生成站点'); |
| 173 | } | 174 | } |
| 174 | //域名是否都已经解析 | 175 | //域名是否都已经解析 |
| 175 | if(!check_domain_record($info['domain'], $serversIpInfo)){ | 176 | if(!check_domain_record($info['domain'], $serversIpInfo)){ |
| @@ -242,6 +243,14 @@ class DomainInfoLogic extends BaseLogic | @@ -242,6 +243,14 @@ class DomainInfoLogic extends BaseLogic | ||
| 242 | } | 243 | } |
| 243 | } | 244 | } |
| 244 | 245 | ||
| 246 | + //小语种为二级目录的站点,强制跳转https | ||
| 247 | + $is_https = 0; | ||
| 248 | + $buildModel = new DeployBuild(); | ||
| 249 | + $build_info = $buildModel->read(['project_id' => $info['project_id']], ['linking_format']); | ||
| 250 | + if ($build_info && $build_info['linking_format'] == 1) { | ||
| 251 | + $is_https = 1; | ||
| 252 | + } | ||
| 253 | + | ||
| 245 | //保存301跳转数据+其他域名 | 254 | //保存301跳转数据+其他域名 |
| 246 | $data = [ | 255 | $data = [ |
| 247 | 'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])), | 256 | 'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])), |
| @@ -249,7 +258,7 @@ class DomainInfoLogic extends BaseLogic | @@ -249,7 +258,7 @@ class DomainInfoLogic extends BaseLogic | ||
| 249 | 'type'=>$this->param['type'], | 258 | 'type'=>$this->param['type'], |
| 250 | 'private_key' => $this->param['key'] ?? '', | 259 | 'private_key' => $this->param['key'] ?? '', |
| 251 | 'private_cert' => $this->param['cert'] ?? '', | 260 | 'private_cert' => $this->param['cert'] ?? '', |
| 252 | - 'is_https' => $this->param['is_https'] ?? 0, | 261 | + 'is_https' => $is_https, |
| 253 | 'amp_status' => $this->param['amp_status'] ?? 0, | 262 | 'amp_status' => $this->param['amp_status'] ?? 0, |
| 254 | 'amp_type' => $this->param['amp_type'] ?? 0, | 263 | 'amp_type' => $this->param['amp_type'] ?? 0, |
| 255 | 'amp_extend_config'=>json_encode($amp_extend_config), | 264 | 'amp_extend_config'=>json_encode($amp_extend_config), |
-
请 注册 或 登录 后发表评论