正在显示
1 个修改的文件
包含
8 行增加
和
25 行删除
| @@ -76,7 +76,7 @@ class DomainInfo extends Command | @@ -76,7 +76,7 @@ class DomainInfo extends Command | ||
| 76 | $end_day = date('Y-m-d H:i:s', strtotime('+1 month'));//域名1月后到期 | 76 | $end_day = date('Y-m-d H:i:s', strtotime('+1 month'));//域名1月后到期 |
| 77 | $list = $domainModel->where('status', '=', 1)->get(); | 77 | $list = $domainModel->where('status', '=', 1)->get(); |
| 78 | foreach ($list as $v) { | 78 | foreach ($list as $v) { |
| 79 | - $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id', 'project_type', 'is_analysis']); | 79 | + $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id', 'project_type']); |
| 80 | if (!$project_info) { | 80 | if (!$project_info) { |
| 81 | continue; | 81 | continue; |
| 82 | } | 82 | } |
| @@ -86,25 +86,6 @@ class DomainInfo extends Command | @@ -86,25 +86,6 @@ class DomainInfo extends Command | ||
| 86 | continue; | 86 | continue; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | - $domain_array = parse_url($v['domain']); | ||
| 90 | - $host = $domain_array['host'] ?? $domain_array['path']; | ||
| 91 | - $host_array = explode('.', $host); | ||
| 92 | - | ||
| 93 | - //判断是否解析泛域名,并更改项目泛域名解析状态 | ||
| 94 | - if($project_info['is_analysis'] == 0){ | ||
| 95 | - $host_array_any = $host_array; | ||
| 96 | - if (count($host_array_any) <= 2) { | ||
| 97 | - array_unshift($host_array_any, '*'); | ||
| 98 | - } else { | ||
| 99 | - $host_array_any[0] = '*'; | ||
| 100 | - } | ||
| 101 | - $any_domain = implode('.', $host_array_any); | ||
| 102 | - $rand_str = generateRandomString(3); | ||
| 103 | - if (check_domain_record(str_replace('*', $rand_str, $any_domain), $servers_ip_info)) { | ||
| 104 | - $projectModel->edit(['is_analysis' => 1], ['id' => $v['project_id']]); | ||
| 105 | - } | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | if ($servers_ip_info['servers_id'] == ServerConfig::SELF_SITE_ID) { | 89 | if ($servers_ip_info['servers_id'] == ServerConfig::SELF_SITE_ID) { |
| 109 | //自建站项目,直接获取主站证书有效期并更新 | 90 | //自建站项目,直接获取主站证书有效期并更新 |
| 110 | $ssl_time = $this->getDomainSslTime($v['domain']); | 91 | $ssl_time = $this->getDomainSslTime($v['domain']); |
| @@ -172,13 +153,15 @@ class DomainInfo extends Command | @@ -172,13 +153,15 @@ class DomainInfo extends Command | ||
| 172 | } | 153 | } |
| 173 | 154 | ||
| 174 | if ($v['amp_status'] == 1) { | 155 | if ($v['amp_status'] == 1) { |
| 175 | - $host_array_amp = $host_array; | ||
| 176 | - if (count($host_array_amp) <= 2) { | ||
| 177 | - array_unshift($host_array_amp, 'm'); | 156 | + $domain_array = parse_url($v['domain']); |
| 157 | + $host = $domain_array['host'] ?? $domain_array['path']; | ||
| 158 | + $host_array = explode('.', $host); | ||
| 159 | + if (count($host_array) <= 2) { | ||
| 160 | + array_unshift($host_array, 'm'); | ||
| 178 | } else { | 161 | } else { |
| 179 | - $host_array_amp[0] = 'm'; | 162 | + $host_array[0] = 'm'; |
| 180 | } | 163 | } |
| 181 | - $amp_domain = implode('.', $host_array_amp); | 164 | + $amp_domain = implode('.', $host_array); |
| 182 | 165 | ||
| 183 | if ($servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) { | 166 | if ($servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) { |
| 184 | //过滤已解析到别的ip的AMP域名 | 167 | //过滤已解析到别的ip的AMP域名 |
-
请 注册 或 登录 后发表评论