作者 刘锟

update

... ... @@ -64,25 +64,15 @@ class Temp extends Command
$domain = $domain_info['domain'];
//获取最新一条小语种生成任务
$notify = $notify_model->read(['project_id' => $value->id, 'type' => 2, 'status' => 3, 'route' => 1], ['data']);
$notify = $notify_model->read(['project_id' => $value->id, 'type' => 2, 'status' => 3, 'route' => 1], ['id']);
if (!$notify) {
//过滤未生成过小语种的项目
continue;
}
$notify_data = json_decode($notify['data'], true);
$language_id = 0;
foreach ($notify_data['language'] as $vl) {
if ($vl > 1) {
$language_id = $vl;
}
}
if (!$language_id) {
continue;
}
$language_info = WebLanguage::getLangById($language_id);
$lan = $language_info->short;
$code = check_curl_status('https://' . $domain . '/' . $lan);
$html = curl_c('https://' . $domain . '/' . $lan, false);
$url = 'https://' . $domain . '/fr';
$code = check_curl_status($url);
$html = curl_c($url);
$is_404 = false;
if (strpos($html, 'Sorry. The page has either moved or cannot be found.') !== false) {
$is_404 = true;
... ... @@ -90,7 +80,7 @@ class Temp extends Command
$data[] = [
$value->id,
$value->title,
'https://' . $domain . '/' . $lan,
$url,
$code,
$is_404
];
... ... @@ -173,7 +163,7 @@ class Temp extends Command
* @author Akun
* @date 2024/12/11 10:15
*/
public function check_server_project_site()
public function check_server_main_site()
{
$server_id = 15;
$server_name = '美服1';
... ...