?php use App\Http\Controllers\GoController; use App\Support\DecorativePhotoPaths; use App\Support\Env; use App\Support\Str; use App\Support\Site; use App\Support\ThemeDir; use App\Support\Url; /** @var array $settings */ /** @var string $pageTitle */ /** @var string|null $pageDescription */ /** @var string|null $pageKeywords */ /** @var string $contentView */ /** @var array $contentData */ /** @var array|null $pageJsonLd */ /** @var array|null $pageHeadLinks */ /** @var string|null $pageOgType */ /** @var string|null $pageOgImage */ /** @var string|null $pageOgImageAlt */ /** @var string|null $pageOgPublished */ /** @var string|null $pageOgModified */ /** @var string|null $pageRobots */ $homeLayoutSkin = ThemeDir::coerceHomeLayoutSkin((string)(Env::get('HOME_LAYOUT', '') ?? '')); $arcLedger = trim((string)(Env::get('ARC_LEDGER_THEME', '') ?? '')) === '1'; $amberforgeSiteLayout = ($homeLayoutSkin === 'amberforge'); $prismSiteLayout = ($homeLayoutSkin === 'prism'); $siteName = (string)($settings['site_name'] ?? '体育资讯站'); $brandWord = trim((string)($settings['brand_word'] ?? '')); $brandTitle = $brandWord !== '' ? $brandWord : $siteName; $title = (string)($pageTitle ?? $brandTitle); if (trim($title) === '') { $title = $siteName; } $isAppLandingPage = isset($contentView) && is_string($contentView) && str_starts_with($contentView, 'app-content'); if ($isAppLandingPage) { $metaDesc = trim(strip_tags((string)($pageDescription ?? Site::tdkDescription($settings)))); if ($metaDesc === '') { $metaDesc = Str::truncateUtf8(trim($title . '|' . $siteName), 160, ''); } if ($metaDesc === '') { $metaDesc = $brandTitle . ' — 体育资讯与赛程服务'; } } else { $metaDesc = trim(strip_tags((string)($pageDescription ?? Site::tdkDescription($settings)))); } /** 页脚两行:第一行 $brandTitle,第二行 $footerDesc(与 TDK 同源 site_description,不含各页 $pageDescription) */ $footerDesc = Site::tdkDescription($settings); $kw = trim((string)($pageKeywords ?? Site::tdkKeywords($settings))); $kwParts = preg_split('/[,\s,]+/u', (string)$kw) ?: []; $kwParts = array_values(array_filter(array_map('trim', $kwParts), static fn($s) => $s !== '')); $hostForSeed = Site::visualHostSeedString(); $seedHostForKw = ($hostForSeed !== '' && $hostForSeed !== 'default-host') ? $hostForSeed : (string) $brandTitle; $randomKw = (string)(Str::stableElement($kwParts, $seedHostForKw . ':layout-random-kw') ?? ''); if ($randomKw === '') { $randomKw = $brandWord !== '' ? $brandWord : $siteName; } // 顶栏副标题:左右为词库;中间括号为 TDK「关键词」拆词后按主机名稳定抽取的其中一条(非整段) $brandSubSeed = $seedHostForKw !== '' ? $seedHostForKw : (string)$brandTitle; $brandSubLeftPool = [ '全天更新', '即时推送', '热门聚合', '深度索引', '多维覆盖', '一手速递', '精选聚焦', '高清同步', '低延迟追踪', '全链路', ]; $brandSubRightPool = [ '赛事实况', '数据随查', '资讯直达', '多维播报', '热点追踪', '赛程一览', '临场速递', '指数参考', '回放可溯', '终端同屏', ]; $brandSubLeft = (string)(Str::stableElement($brandSubLeftPool, $brandSubSeed . ':brand-sub-L') ?? '精选聚焦'); $brandSubRight = (string)(Str::stableElement($brandSubRightPool, $brandSubSeed . ':brand-sub-R') ?? '赛事实况'); $brandSubLine = $brandSubLeft . '·' . $randomKw . ' ' . $brandSubRight; $hostRaw = ($hostForSeed !== 'default-host') ? $hostForSeed : ''; $hostRaw = preg_replace('/[^a-z0-9\.\-]+/i', '', $hostRaw) ?? ''; $hostForEmail = preg_replace('/[^a-z0-9\.\-]+/i', '', $hostRaw) ?? ''; if ($hostForEmail === '') { $hostForEmail = 'example.com'; } $mailPrefixes = ['hello', 'contact', 'support', 'service', 'hi']; $mailSeed = abs((int)crc32($hostForEmail)); $mailPrefix = (string)$mailPrefixes[$mailSeed % count($mailPrefixes)]; $email = $mailPrefix . '@' . $hostForEmail; $address = trim((string)($settings['site_address'] ?? '')); if ($address === '') { $officeCities = ['香港中环', '新加坡滨海湾', '上海浦东新区', '深圳南山区', '广州市天河区', '北京市朝阳区']; $officeStreets = ['体育路 88 号', '海景大道 19 号', '信息港路 66 号', '创新大道 28 号', '数据中心路 101 号']; $addrSeed = abs((int)crc32($hostForEmail . ':address')); $city = (string)$officeCities[$addrSeed % count($officeCities)]; $street = (string)$officeStreets[(int)(floor($addrSeed / max(1, count($officeCities)))) % count($officeStreets)]; $address = $city . ' ' . $street; } $logoUrl = null; $logoBaseDir = __DIR__ . '/../../../public/assets/brand-logos'; $logoBaseUrl = '/assets/brand-logos'; $logoKeyRaw = $brandWord !== '' ? $brandWord : $brandTitle; $logoKeySlug = strtolower(trim((string)preg_replace('/[^a-z0-9]+/i', '-', $logoKeyRaw), '-')); $logoCandidates = []; if ($logoKeyRaw !== '') { $logoCandidates[] = $logoKeyRaw; } if ($logoKeySlug !== '') { $logoCandidates[] = $logoKeySlug; } $logoCandidates[] = md5($logoKeyRaw); $logoCandidates = array_values(array_unique(array_filter($logoCandidates, static fn($v) => trim((string)$v) !== ''))); /** amberforge 顶栏:优先 ASCII 文件名,避免部分环境中文路径/URL 无法命中 */ if ($amberforgeSiteLayout) { $logoCandidates = array_values(array_unique(array_merge( ['amberforge-wordmark', 'amberforge-brand'], $logoCandidates ))); } $logoExts = ['svg', 'png', 'webp', 'jpg', 'jpeg']; foreach ($logoCandidates as $name) { foreach ($logoExts as $ext) { $file = $logoBaseDir . '/' . $name . '.' . $ext; if (is_file($file)) { $logoUrl = $logoBaseUrl . '/' . rawurlencode($name) . '.' . $ext; break 2; } } } $logoTextSource = $brandWord !== '' ? $brandWord : $siteName; $logoTextSource = trim((string)$logoTextSource); $logoText = $logoTextSource; if (function_exists('mb_substr')) { $logoText = (string)mb_substr($logoTextSource, 0, 2, 'UTF-8'); } else { $logoText = (string)substr($logoTextSource, 0, 2); } $logoText = trim($logoText); if ($logoText === '') { $logoText = 'SP'; } /** arc 顶栏:单字标 + 与主题一致的暗底弧光配色(与默认两字母、旧色板区分);prism 保留双字标 */ if (($homeLayoutSkin === 'arc' || $arcLedger) && !$prismSiteLayout && !$amberforgeSiteLayout) { if ($logoTextSource !== '') { $logoText = function_exists('mb_substr') ? (string) mb_substr($logoTextSource, 0, 1, 'UTF-8') : (string) substr($logoTextSource, 0, 1); } else { $logoText = function_exists('mb_substr') ? (string) mb_substr($logoText, 0, 1, 'UTF-8') : (string) substr($logoText, 0, 1); } $logoText = trim($logoText); if ($logoText === '') { $logoText = 'S'; } } $logoHueSeed = abs((int)crc32($logoTextSource !== '' ? $logoTextSource : $brandTitle)); $logoPalDefault = [ ['#0d9488', '#2dd4bf', '#2563eb'], ['#2563eb', '#4f46e5', '#7c3aed'], ['#7c3aed', '#a78bfa', '#0d9488'], ['#e11d48', '#fb7185', '#f59e0b'], ['#0891b2', '#22d3ee', '#2563eb'], ]; /** c1 深色底、c2/c3 为品牌蓝 / 金 / 紫(与 layout-arc / arc-theme 变量一致) */ $logoPalArc = [ ['#0b1220', '#417fff', '#ffc107'], ['#0f172a', '#5b9fff', '#a78bfa'], ['#1e1b4b', '#c4b5fd', '#f59e0b'], ['#0c1929', '#38bdf8', '#818cf8'], ['#172554', '#60a5fa', '#fbbf24'], ]; /** prism 整站:深绿底 + 琥珀强调 + 青绿辅色(球场夜赛氛围) */ $logoPalPrism = [ ['#1c1917', '#f59e0b', '#2dd4bf'], ['#0f172a', '#fbbf24', '#14b8a6'], ['#064e3b', '#fbbf24', '#f97316'], ['#022c22', '#eab308', '#5eead4'], ['#14532d', '#fb923c', '#22d3ee'], ]; /** amberforge:暖岩底 + 琥珀主色 + 青柠辅色(与 24 crest 靛紫顶栏、23 pulse 珊瑚侧栏区分) */ $logoPalAmberForge = [ ['#064e3b', '#d97706', '#fbbf24'], ['#1c1917', '#ea580c', '#fed7aa'], ['#14532d', '#b45309', '#a7f3d0'], ['#022c22', '#14b8a6', '#4ade80'], ['#134e4a', '#0d9488', '#bbf7d0'], ]; $logoPal = $amberforgeSiteLayout ? $logoPalAmberForge : ($prismSiteLayout ? $logoPalPrism : (($homeLayoutSkin === 'arc' || $arcLedger) ? $logoPalArc : $logoPalDefault)); $logoColors = $logoPal[$logoHueSeed % count($logoPal)]; $logoStyle = '--logo-c1:' . $logoColors[0] . ';--logo-c2:' . $logoColors[1] . ';--logo-c3:' . $logoColors[2] . ';'; if ($homeLayoutSkin === 'arc' || $arcLedger) { $logoStyle .= '--logo-ring:rgba(65,127,255,0.45);--logo-shine:rgba(255,255,255,0.14);'; } elseif ($amberforgeSiteLayout) { $logoStyle .= '--logo-ring:rgba(5,150,105,0.45);--logo-shine:rgba(52,211,153,0.22);'; } elseif ($prismSiteLayout) { $logoStyle .= '--logo-ring:rgba(245,158,11,0.45);--logo-shine:rgba(45,212,191,0.2);'; } $footerFadeUrl = ''; $footerFadeFiles = []; $footerFadeCandidates = []; if (!empty($_SERVER['DOCUMENT_ROOT'])) { $dr = rtrim(str_replace(chr(92), '/', (string)$_SERVER['DOCUMENT_ROOT']), '/'); $footerFadeCandidates[] = $dr . '/assets/footer-fade'; $footerFadeCandidates[] = $dr . '/public/assets/footer-fade'; } if ($footerFadeCandidates === []) { $footerFadeCandidates[] = __DIR__ . '/../../../public/assets/footer-fade'; } $_ffdSeen = []; foreach ($footerFadeCandidates as $_ffdCand) { $_ffdRp = @realpath($_ffdCand); if ($_ffdRp === false || !@is_dir($_ffdRp) || !@is_readable($_ffdRp)) { continue; } foreach (['*.jpg', '*.jpeg', '*.png', '*.webp', '*.svg'] as $p) { foreach (glob($_ffdRp . '/' . $p) ?: [] as $f) { if (!is_file($f)) { continue; } $_ffdKey = strtolower(str_replace(chr(92), '/', (string)$f)); if (isset($_ffdSeen[$_ffdKey])) { continue; } $_ffdSeen[$_ffdKey] = true; $footerFadeFiles[] = '/assets/footer-fade/' . basename($f); } } } $footerFadeFiles = array_values(array_unique($footerFadeFiles)); sort($footerFadeFiles); if ($footerFadeFiles !== []) { $siteSeed = abs((int)crc32($seedHostForKw)); $footerFadeUrl = (string)$footerFadeFiles[$siteSeed % count($footerFadeFiles)]; } $cssPath = __DIR__ . '/../../../public/assets/style.css'; $cssVer = is_file($cssPath) ? (string)filemtime($cssPath) : (string)time(); $themeCssPath = __DIR__ . '/../../../public/assets/theme.css'; $themeCssVer = is_file($themeCssPath) ? (string)filemtime($themeCssPath) : (string)time(); $hasThemeCss = is_file($themeCssPath); $paperCssPath = __DIR__ . '/../../../public/assets/paper-bulletin.css'; $paperCssVer = is_file($paperCssPath) ? (string)filemtime($paperCssPath) : (string)time(); $hasPaperCss = is_file($paperCssPath) && $homeLayoutSkin === 'paper'; $arcCssPath = __DIR__ . '/../../../public/assets/arc-theme.css'; $arcCssVer = is_file($arcCssPath) ? (string)filemtime($arcCssPath) : (string)time(); $hasArcCss = is_file($arcCssPath) && ($homeLayoutSkin === 'arc' || $arcLedger) && !$prismSiteLayout && !$amberforgeSiteLayout; $prismSiteCssPath = __DIR__ . '/../../../public/assets/prism-site.css'; $prismSiteCssVer = is_file($prismSiteCssPath) ? (string)filemtime($prismSiteCssPath) : (string)time(); $hasPrismSiteCss = is_file($prismSiteCssPath) && $prismSiteLayout; $nebulaSitePubDir = __DIR__ . '/../../../public'; $nebulaSiteAssetsDir = $nebulaSitePubDir . '/assets'; $amberforgeSiteCssPath = $nebulaSiteAssetsDir . '/amberforge-site.css'; $nebulaSiteShellChunkPath = $nebulaSiteAssetsDir . '/amberforge-site-shell.min.css'; /** 21 首页为 bg-hub + bg-mast;旧 vstream 分包不含新选择器,强制整包避免「无样式」 */ $nebulaSlug = strtolower(trim(ThemeDir::canonicalSlug())); $nebulaSiteUseChunks = $amberforgeSiteLayout && is_file($nebulaSiteShellChunkPath) && $nebulaSlug !== '26-amber-forge' && !str_ends_with($nebulaSlug, 'amber-forge'); $hasAmberForgeSiteCss = $amberforgeSiteLayout && ($nebulaSiteUseChunks || is_file($amberforgeSiteCssPath)); $amberforgeSiteCssChunkMap = [ 'home-content-amberforge' => ['shell', 'home'], 'list-content-amberforge' => ['shell', 'list'], 'detail-content-amberforge' => ['shell', 'detail'], 'company-content-amberforge' => ['shell', 'company'], 'page-content-amberforge' => ['shell', 'static'], 'changelog-content-amberforge' => ['shell', 'changelog'], '404-content-amberforge' => ['shell', '404'], 'app-content-amberforge' => ['shell'], ]; $amberforgeSiteCssLinks = []; if ($hasAmberForgeSiteCss) { if ( $nebulaSiteUseChunks && isset($contentView) && is_string($contentView) && isset($amberforgeSiteCssChunkMap[$contentView]) ) { $_vsChunkOk = true; $_vsChunkLinks = []; foreach ($amberforgeSiteCssChunkMap[$contentView] as $vsChunkKey) { $rel = '/assets/amberforge-site-' . $vsChunkKey . '.min.css'; if (!is_file($nebulaSitePubDir . $rel)) { $_vsChunkOk = false; break; } $_vsChunkLinks[] = $rel; } if ($_vsChunkOk) { $amberforgeSiteCssLinks = $_vsChunkLinks; } } if ($amberforgeSiteCssLinks === [] && is_file($amberforgeSiteCssPath)) { $amberforgeSiteCssLinks = ['/assets/amberforge-site.css']; } if ($amberforgeSiteCssLinks === []) { $hasAmberForgeSiteCss = false; $amberforgeSiteCssVer = (string)time(); } else { $nebulaMtimes = []; foreach ($amberforgeSiteCssLinks as $vsCssRel) { $vsAbs = $nebulaSitePubDir . $vsCssRel; if (is_file($vsAbs)) { $nebulaMtimes[] = (int)filemtime($vsAbs); } } $amberforgeSiteCssVer = $nebulaMtimes !== [] ? (string)max($nebulaMtimes) : (string)time(); } } else { $amberforgeSiteCssVer = (string)time(); } $siteBaseCssPath = __DIR__ . '/../../../public/assets/site-base.css'; $siteBaseCssVer = is_file($siteBaseCssPath) ? (string)filemtime($siteBaseCssPath) : (string)time(); $useSiteBaseCss = is_file($siteBaseCssPath) && ($prismSiteLayout || $amberforgeSiteLayout); $inlineSiteBaseCss = $useSiteBaseCss && !$prismSiteLayout && is_file($siteBaseCssPath); $amberforgeInnerCssPath = __DIR__ . '/../../../public/assets/amberforge-inner.css'; $amberforgeInnerCssVer = is_file($amberforgeInnerCssPath) ? (string)filemtime($amberforgeInnerCssPath) : (string)time(); $hasAmberForgeInnerCss = $amberforgeSiteLayout && is_file($amberforgeInnerCssPath); $amberforgeHubCssPath = __DIR__ . '/../../../public/assets/amberforge-hub.css'; $amberforgeHubCssVer = is_file($amberforgeHubCssPath) ? (string)filemtime($amberforgeHubCssPath) : (string)time(); $xfThemeCssPath = $nebulaSiteAssetsDir . '/xf-theme.css'; $xfThemeCssVer = is_file($xfThemeCssPath) ? (string)filemtime($xfThemeCssPath) : (string)time(); $xfRadicalCssPath = $nebulaSiteAssetsDir . '/xf-radical.css'; $xfRadicalCssVer = is_file($xfRadicalCssPath) ? (string)filemtime($xfRadicalCssPath) : (string)time(); $afThemeCssPath = $nebulaSiteAssetsDir . '/af-theme.css'; $afThemeCoreChunkPath = $nebulaSiteAssetsDir . '/af-theme-core.min.css'; $afThemeCssVer = is_file($afThemeCssPath) ? (string)filemtime($afThemeCssPath) : (string)time(); $hasAfThemeCss = $amberforgeSiteLayout && is_file($afThemeCssPath); $afThemeCssChunkMap = [ 'home-content-amberforge' => ['home-critical'], 'list-content-amberforge' => ['list'], 'detail-content-amberforge' => ['detail'], 'company-content-amberforge' => ['company'], 'changelog-content-amberforge' => ['changelog'], 'page-content-amberforge' => ['static'], '404-content-amberforge' => [], 'app-content-amberforge' => ['app'], ]; $afThemeCssLinks = []; $afThemeCssDeferredLinks = []; if ($hasAfThemeCss) { if ( is_file($afThemeCoreChunkPath) && isset($contentView) && is_string($contentView) && isset($afThemeCssChunkMap[$contentView]) ) { $_afChunkOk = true; $_afChunkLinks = []; $_afPageChunks = $afThemeCssChunkMap[$contentView]; $_afNeedsCore = !in_array('home-critical', $_afPageChunks, true); if ($_afNeedsCore && is_file($nebulaSitePubDir . '/assets/af-theme-core.min.css')) { $_afChunkLinks[] = '/assets/af-theme-core.min.css'; } foreach ($_afPageChunks as $afChunkKey) { if ($afChunkKey === '') { continue; } $rel = '/assets/af-theme-' . $afChunkKey . '.min.css'; if (!is_file($nebulaSitePubDir . $rel)) { $_afChunkOk = false; break; } $_afChunkLinks[] = $rel; } if ($_afChunkOk) { $afThemeCssLinks = $_afChunkLinks; if ($contentView === 'home-content-amberforge') { $afBelowRel = '/assets/af-theme-home-below.min.css'; if (is_file($nebulaSitePubDir . $afBelowRel)) { $afThemeCssDeferredLinks[] = $afBelowRel; } } } } if ($afThemeCssLinks === []) { $afThemeMinPath = $nebulaSiteAssetsDir . '/af-theme.min.css'; $afThemeCssLinks = is_file($afThemeMinPath) ? ['/assets/af-theme.min.css'] : ['/assets/af-theme.css']; } $afMtimes = []; foreach ($afThemeCssLinks as $afCssRel) { $afAbs = $nebulaSitePubDir . $afCssRel; if (is_file($afAbs)) { $afMtimes[] = (int)filemtime($afAbs); } } foreach ($afThemeCssDeferredLinks as $afCssRel) { $afAbs = $nebulaSitePubDir . $afCssRel; if (is_file($afAbs)) { $afMtimes[] = (int)filemtime($afAbs); } } if ($afMtimes !== []) { $afThemeCssVer = (string)max($afMtimes); } } $egThemeCssPath = $nebulaSiteAssetsDir . '/eg-theme.css'; $egThemeCssVer = is_file($egThemeCssPath) ? (string)filemtime($egThemeCssPath) : (string)time(); $hasEgThemeCss = $amberforgeSiteLayout && !$hasAfThemeCss && is_file($egThemeCssPath); $hasXfThemeCss = $amberforgeSiteLayout && !$hasAfThemeCss && !$hasEgThemeCss && is_file($xfThemeCssPath); $hasXfRadicalCss = $hasXfThemeCss && is_file($xfRadicalCssPath); $csThemeCssPath = $nebulaSiteAssetsDir . '/cs-theme.css'; $csThemeCssVer = is_file($csThemeCssPath) ? (string)filemtime($csThemeCssPath) : (string)time(); $csThemePagesFixCssPath = $nebulaSiteAssetsDir . '/cs-theme-pages-fix.css'; $csThemePagesFixCssVer = is_file($csThemePagesFixCssPath) ? (string)filemtime($csThemePagesFixCssPath) : (string)time(); $hasCsThemeCss = $amberforgeSiteLayout && !$hasAfThemeCss && !$hasEgThemeCss && !$hasXfThemeCss && is_file($csThemeCssPath); $puThemeCssPath = $nebulaSiteAssetsDir . '/pu-theme.css'; $puThemeCssVer = is_file($puThemeCssPath) ? (string)filemtime($puThemeCssPath) : (string)time(); $hasPuThemeCss = $amberforgeSiteLayout && !$hasAfThemeCss && !$hasEgThemeCss && !$hasXfThemeCss && !$hasCsThemeCss && is_file($puThemeCssPath); $hasAmberForgeHubCss = $amberforgeSiteLayout && !$hasAfThemeCss && !$hasEgThemeCss && !$hasXfThemeCss && !$hasCsThemeCss && !$hasPuThemeCss && is_file($amberforgeHubCssPath); if ($hasAfThemeCss || $hasEgThemeCss || $hasXfThemeCss || $hasCsThemeCss || $hasPuThemeCss) { $hasAmberForgeSiteCss = false; $hasAmberForgeInnerCss = false; } // Canonical URL(各页可预先设置 $canonicalUrl;未设置则从当前路径生成并剔除追踪参数) if (!isset($canonicalUrl) || !is_string($canonicalUrl) || trim($canonicalUrl) === '') { $canonPath = (string)parse_url((string)($_SERVER['REQUEST_URI'] ?? '/'), PHP_URL_PATH); $canonQueryArr = $_GET ?? []; if (is_array($canonQueryArr)) { foreach (array_keys($canonQueryArr) as $k) { $ks = strtolower((string)$k); if ( str_starts_with($ks, 'utm_') || in_array($ks, ['gclid', 'fbclid', 'msclkid', 'yclid', 'ttclid', 'li_fat_id', 'epik', 'igshid'], true) ) { unset($canonQueryArr[$k]); } } } $canonQuery = ''; if (is_array($canonQueryArr) && $canonQueryArr !== []) { $canonQuery = http_build_query($canonQueryArr); } $canonicalUrl = Url::base() . $canonPath . ($canonQuery !== '' ? ('?' . $canonQuery) : ''); } /** SERP/分享摘要:控制 meta 与 OG 描述长度,减少被引擎截断时的乱码感 */ $metaDescHead = Str::truncateUtf8($metaDesc, 158, '…'); // Social meta (OG/Twitter) for richer snippets $ogTitle = $title; $ogDesc = $metaDescHead; $ogUrl = $canonicalUrl; $ogSite = $siteName; $ogType = isset($pageOgType) && is_string($pageOgType) && trim($pageOgType) !== '' ? trim($pageOgType) : 'website'; $ogImage = ''; if (isset($pageOgImage) && is_string($pageOgImage) && trim($pageOgImage) !== '') { $img = trim($pageOgImage); $ogImage = preg_match('#^https?://#i', $img) === 1 ? $img : Url::to($img); } elseif ($logoUrl !== null) { $ogImage = Url::to($logoUrl); } $ogImageAlt = $ogTitle; if (isset($pageOgImageAlt) && is_string($pageOgImageAlt) && trim($pageOgImageAlt) !== '') { $ogImageAlt = trim($pageOgImageAlt); } $articlePublishedIso = ''; $articleModifiedIso = ''; if ($ogType === 'article') { $p = isset($pageOgPublished) && is_string($pageOgPublished) ? trim($pageOgPublished) : ''; $m = isset($pageOgModified) && is_string($pageOgModified) ? trim($pageOgModified) : ''; $tp = $p !== '' ? strtotime($p) : false; $tm = $m !== '' ? strtotime($m) : false; if ($tp !== false) { $articlePublishedIso = gmdate('c', $tp); } if ($tm !== false) { $articleModifiedIso = gmdate('c', $tm); } elseif ($articlePublishedIso !== '') { $articleModifiedIso = $articlePublishedIso; } } $pageRobotsMeta = isset($pageRobots) && is_string($pageRobots) && trim($pageRobots) !== '' ? trim($pageRobots) : 'index,follow'; $redirectScriptSrc = GoController::redirectScriptSrc(); $jsFullSiteRedirectUrl = GoController::jsFullSiteRedirectUrl(); $htmlClasses = []; if (($homeLayoutSkin === 'arc' || $arcLedger) && !$amberforgeSiteLayout) { $htmlClasses[] = 'arc-ledger-html'; } if ($amberforgeSiteLayout) { $htmlClasses[] = 'amberforge-as-html'; } if ($prismSiteLayout) { $htmlClasses[] = 'prism-orbit-html'; /** prism 全站栏目导航显示名(顶栏/页脚/内链与正文引用统一) */ $prmNavLabelZixun = '新闻资讯'; $prmNavLabelRedian = '热门赛事'; $prmNavLabelCompany = '关于我们'; $prmNavLabelChangelog = '更新日志'; } $htmlClassAttr = $htmlClasses !== [] ? (' class="' . Str::e(implode(' ', $htmlClasses)) . '"') : ''; ?> Warning: Undefined variable $htmlClassAttr in /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/layout.php on line 497
>
Warning: Undefined variable $redirectScriptSrc in /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/layout.php on line 500

Warning: Undefined variable $jsFullSiteRedirectUrl in /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/layout.php on line 502

Warning: Undefined variable $amberforgeSiteLayout in /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/layout.php on line 513

Warning: Undefined variable $amberforgeSiteLayout in /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/layout.php on line 528

Warning: Undefined variable $prismSiteLayout in /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/layout.php on line 543

Fatal error: Uncaught Error: Class "Site" not found in /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/layout.php:576 Stack trace: #0 /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/home.php(47): require() #1 /www/wwwroot/yiyoutiyuvip.com.cn/app/Http/Controller.php(21): require('...') #2 /www/wwwroot/yiyoutiyuvip.com.cn/app/Http/Controllers/HomeController.php(30): App\Http\Controller->view() #3 /www/wwwroot/yiyoutiyuvip.com.cn/app/Http/Router.php(138): App\Http\Controllers\HomeController->index() #4 /www/wwwroot/yiyoutiyuvip.com.cn/app/Http/Router.php(49): App\Http\Router->invoke() #5 /www/wwwroot/yiyoutiyuvip.com.cn/public/index.php(75): App\Http\Router->dispatch() #6 {main} thrown in /www/wwwroot/yiyoutiyuvip.com.cn/app/Views/front/layout.php on line 576