作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !2742
@@ -195,10 +195,7 @@ class DomainInfoLogic extends BaseLogic @@ -195,10 +195,7 @@ class DomainInfoLogic extends BaseLogic
195 $host = $domain_array['host'] ?? $domain_array['path']; 195 $host = $domain_array['host'] ?? $domain_array['path'];
196 $host_array = explode('.',$host); 196 $host_array = explode('.',$host);
197 197
198 - if($this->param['type'] == 3){  
199 - //需要申请通配符证书  
200 -  
201 - //判断*是否已经解析 198 + //已经解析泛域名的项目,更改项目解析状态
202 $host_array_any = $host_array; 199 $host_array_any = $host_array;
203 if (count($host_array_any) <= 2) { 200 if (count($host_array_any) <= 2) {
204 array_unshift($host_array_any, '*'); 201 array_unshift($host_array_any, '*');
@@ -207,7 +204,16 @@ class DomainInfoLogic extends BaseLogic @@ -207,7 +204,16 @@ class DomainInfoLogic extends BaseLogic
207 } 204 }
208 $any_domain = implode('.',$host_array_any); 205 $any_domain = implode('.',$host_array_any);
209 $rand_str = generateRandomString(3); 206 $rand_str = generateRandomString(3);
210 - if(!check_domain_record(str_replace('*',$rand_str,$any_domain), $serversIpInfo)){ 207 + $any_check_status = check_domain_record(str_replace('*',$rand_str,$any_domain), $serversIpInfo);
  208 + if($any_check_status){
  209 + $project_model->edit(['is_analysis'=>1],['id'=>$info['project_id']]);
  210 + }
  211 +
  212 + if($this->param['type'] == 3){
  213 + //需要申请通配符证书
  214 +
  215 + //判断是否已经解析泛域名
  216 + if(!$any_check_status){
211 $this->fail('域名' . $any_domain . '未解析至目标服务器'); 217 $this->fail('域名' . $any_domain . '未解析至目标服务器');
212 } 218 }
213 219