* Date: 2026-6-2 */ if (!defined('ROOT_PATH')) exit; $aboutChannel = $db->fetch("SELECT * FROM {$db->table('channel')} WHERE channel_type=3 AND is_show=1 ORDER BY list_order ASC,id ASC LIMIT 1"); $aboutPage = $aboutChannel ? $db->fetch("SELECT * FROM {$db->table('page')} WHERE channel_id=".intval($aboutChannel['id'])." AND status=1 ORDER BY id DESC LIMIT 1") : null; $companyIntro = isset($site['company_intro']) ? trim(strip_tags($site['company_intro'])) : ''; $companyIntroText = $companyIntro !== '' ? $companyIntro : ($aboutPage ? trim(strip_tags($aboutPage['content'])) : ('欢迎来到'.$site['site_name'])); $heroSlidePic = (!empty($slides) && !empty($slides[0]['slide_pic'])) ? $slides[0]['slide_pic'] : (($aboutPage && !empty($aboutPage['litpic'])) ? $aboutPage['litpic'] : 'https://picsum.photos/800/600?random=21'); $productChannel = $db->fetch("SELECT * FROM {$db->table('channel')} WHERE channel_type=2 AND is_show=1 ORDER BY list_order ASC,id ASC LIMIT 1"); $newsChannel = $db->fetch("SELECT * FROM {$db->table('channel')} WHERE channel_type=1 AND is_show=1 ORDER BY list_order ASC,id ASC LIMIT 1"); $homeProducts = $db->fetchAll("SELECT * FROM {$db->table('product')} WHERE status=1 ORDER BY create_time DESC LIMIT 8"); $homeNews = $db->fetchAll("SELECT * FROM {$db->table('article')} WHERE status=1 ORDER BY create_time DESC LIMIT 6"); ?>