作者 刘锟

update

@@ -10,7 +10,6 @@ use App\Models\Domain\DomainInfo; @@ -10,7 +10,6 @@ use App\Models\Domain\DomainInfo;
10 use App\Models\Product\KeywordRelated; 10 use App\Models\Product\KeywordRelated;
11 use App\Models\Product\Product; 11 use App\Models\Product\Product;
12 use App\Models\Project\Project; 12 use App\Models\Project\Project;
13 -use App\Models\WebSetting\WebLanguage;  
14 use App\Services\BatchExportService; 13 use App\Services\BatchExportService;
15 use App\Services\ProjectServer; 14 use App\Services\ProjectServer;
16 use Illuminate\Console\Command; 15 use Illuminate\Console\Command;
@@ -63,6 +62,15 @@ class Temp extends Command @@ -63,6 +62,15 @@ class Temp extends Command
63 } 62 }
64 $domain = $domain_info['domain']; 63 $domain = $domain_info['domain'];
65 64
  65 + //获取项目所在服务器
  66 + $serve_ip_info = $server_ip_model->read(['id' => $value->serve_id], ['domain', 'ip']);
  67 + if (!$serve_ip_info) {
  68 + continue;
  69 + }
  70 + if (!check_domain_record($domain, $serve_ip_info)) {
  71 + continue;
  72 + }
  73 +
66 //获取最新一条小语种生成任务 74 //获取最新一条小语种生成任务
67 $notify = $notify_model->read(['project_id' => $value->id, 'type' => 2, 'status' => 3, 'route' => 1], ['id']); 75 $notify = $notify_model->read(['project_id' => $value->id, 'type' => 2, 'status' => 3, 'route' => 1], ['id']);
68 if (!$notify) { 76 if (!$notify) {
@@ -72,9 +80,9 @@ class Temp extends Command @@ -72,9 +80,9 @@ class Temp extends Command
72 80
73 $url = 'https://' . $domain . '/fr'; 81 $url = 'https://' . $domain . '/fr';
74 $code = check_curl_status($url); 82 $code = check_curl_status($url);
75 - $html = curl_c($url); 83 + $html = curl_c($url, false);
76 $is_404 = false; 84 $is_404 = false;
77 - if (strpos($html, 'Sorry. The page has either moved or cannot be found.') !== false) { 85 + if (strpos(strtolower($html), 'sorry. the page has either moved or cannot be found.') !== false) {
78 $is_404 = true; 86 $is_404 = true;
79 } 87 }
80 $data[] = [ 88 $data[] = [