作者 刘锟

update

@@ -64,25 +64,15 @@ class Temp extends Command @@ -64,25 +64,15 @@ class Temp extends Command
64 $domain = $domain_info['domain']; 64 $domain = $domain_info['domain'];
65 65
66 //获取最新一条小语种生成任务 66 //获取最新一条小语种生成任务
67 - $notify = $notify_model->read(['project_id' => $value->id, 'type' => 2, 'status' => 3, 'route' => 1], ['data']); 67 + $notify = $notify_model->read(['project_id' => $value->id, 'type' => 2, 'status' => 3, 'route' => 1], ['id']);
68 if (!$notify) { 68 if (!$notify) {
69 //过滤未生成过小语种的项目 69 //过滤未生成过小语种的项目
70 continue; 70 continue;
71 } 71 }
72 - $notify_data = json_decode($notify['data'], true);  
73 - $language_id = 0;  
74 - foreach ($notify_data['language'] as $vl) {  
75 - if ($vl > 1) {  
76 - $language_id = $vl;  
77 - }  
78 - }  
79 - if (!$language_id) {  
80 - continue;  
81 - }  
82 - $language_info = WebLanguage::getLangById($language_id);  
83 - $lan = $language_info->short;  
84 - $code = check_curl_status('https://' . $domain . '/' . $lan);  
85 - $html = curl_c('https://' . $domain . '/' . $lan, false); 72 +
  73 + $url = 'https://' . $domain . '/fr';
  74 + $code = check_curl_status($url);
  75 + $html = curl_c($url);
86 $is_404 = false; 76 $is_404 = false;
87 if (strpos($html, 'Sorry. The page has either moved or cannot be found.') !== false) { 77 if (strpos($html, 'Sorry. The page has either moved or cannot be found.') !== false) {
88 $is_404 = true; 78 $is_404 = true;
@@ -90,7 +80,7 @@ class Temp extends Command @@ -90,7 +80,7 @@ class Temp extends Command
90 $data[] = [ 80 $data[] = [
91 $value->id, 81 $value->id,
92 $value->title, 82 $value->title,
93 - 'https://' . $domain . '/' . $lan, 83 + $url,
94 $code, 84 $code,
95 $is_404 85 $is_404
96 ]; 86 ];
@@ -173,7 +163,7 @@ class Temp extends Command @@ -173,7 +163,7 @@ class Temp extends Command
173 * @author Akun 163 * @author Akun
174 * @date 2024/12/11 10:15 164 * @date 2024/12/11 10:15
175 */ 165 */
176 - public function check_server_project_site() 166 + public function check_server_main_site()
177 { 167 {
178 $server_id = 15; 168 $server_id = 15;
179 $server_name = '美服1'; 169 $server_name = '美服1';