199 lines
8.1 KiB
TypeScript
199 lines
8.1 KiB
TypeScript
|
|
import type { Metadata } from 'next';
|
|||
|
|
import Script from 'next/script';
|
|||
|
|
import './globals.css';
|
|||
|
|
|
|||
|
|
export const metadata: Metadata = {
|
|||
|
|
title: {
|
|||
|
|
template: '%s | HaoAWS',
|
|||
|
|
default: 'HaoAWS - 领先的AWS云服务与数字化转型解决方案提供商',
|
|||
|
|
},
|
|||
|
|
description:
|
|||
|
|
'HaoAWS专注AWS云服务与企业数字化转型,提供专业的云计算解决方案。服务800+成功案例,150+AWS专业团队,助力企业实现云端升级。',
|
|||
|
|
keywords: [
|
|||
|
|
'AWS云服务',
|
|||
|
|
'企业数字化转型',
|
|||
|
|
'云计算迁移服务',
|
|||
|
|
'云架构设计',
|
|||
|
|
'数据分析平台',
|
|||
|
|
],
|
|||
|
|
|
|||
|
|
authors: [{ name: 'HaoAWS', url: 'https://haoaws.com' }],
|
|||
|
|
creator: 'HaoAWS',
|
|||
|
|
publisher: 'HaoAWS',
|
|||
|
|
formatDetection: {
|
|||
|
|
email: false,
|
|||
|
|
address: false,
|
|||
|
|
telephone: false,
|
|||
|
|
},
|
|||
|
|
metadataBase: new URL('https://haoaws.com'),
|
|||
|
|
alternates: {
|
|||
|
|
canonical: '/',
|
|||
|
|
languages: {
|
|||
|
|
'zh-CN': '/',
|
|||
|
|
'zh-TW': '/zh-TW',
|
|||
|
|
en: '/en',
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
openGraph: {
|
|||
|
|
type: 'website',
|
|||
|
|
locale: 'zh_CN',
|
|||
|
|
url: 'https://haoaws.com',
|
|||
|
|
siteName: 'HaoAWS',
|
|||
|
|
title: 'HaoAWS - 领先的AWS云服务与数字化转型解决方案提供商',
|
|||
|
|
description:
|
|||
|
|
'HaoAWS专注AWS云服务与企业数字化转型,提供专业的云计算解决方案。服务800+成功案例,150+AWS专业团队,助力企业实现云端升级。',
|
|||
|
|
images: [
|
|||
|
|
{
|
|||
|
|
url: '/og-image.jpg',
|
|||
|
|
width: 1200,
|
|||
|
|
height: 630,
|
|||
|
|
alt: 'HaoAWS - AWS云服务与数字化转型解决方案专家',
|
|||
|
|
},
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
twitter: {
|
|||
|
|
card: 'summary_large_image',
|
|||
|
|
title: 'HaoAWS - 领先的AWS云服务与数字化转型解决方案提供商',
|
|||
|
|
description: 'HaoAWS专注AWS云服务与企业数字化转型,提供专业的云计算解决方案。',
|
|||
|
|
images: ['/og-image.jpg'],
|
|||
|
|
creator: '@haoaws',
|
|||
|
|
},
|
|||
|
|
robots: {
|
|||
|
|
index: true,
|
|||
|
|
follow: true,
|
|||
|
|
googleBot: {
|
|||
|
|
index: true,
|
|||
|
|
follow: true,
|
|||
|
|
'max-video-preview': -1,
|
|||
|
|
'max-image-preview': 'large',
|
|||
|
|
'max-snippet': -1,
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
verification: {
|
|||
|
|
google: 'your-google-verification-code',
|
|||
|
|
yandex: 'your-yandex-verification-code',
|
|||
|
|
yahoo: 'your-yahoo-verification-code',
|
|||
|
|
},
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
|||
|
|
return (
|
|||
|
|
<html lang="zh-CN" data-oid="l6_rt4s">
|
|||
|
|
<head data-oid="qm2:6p3">
|
|||
|
|
<link rel="icon" href="/favicon.ico" data-oid="me:zhp-" />
|
|||
|
|
<link
|
|||
|
|
rel="apple-touch-icon"
|
|||
|
|
sizes="180x180"
|
|||
|
|
href="/apple-touch-icon.png"
|
|||
|
|
data-oid="um.4go3"
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
<link
|
|||
|
|
rel="icon"
|
|||
|
|
type="image/png"
|
|||
|
|
sizes="32x32"
|
|||
|
|
href="/favicon-32x32.png"
|
|||
|
|
data-oid="2kams1f"
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
<link
|
|||
|
|
rel="icon"
|
|||
|
|
type="image/png"
|
|||
|
|
sizes="16x16"
|
|||
|
|
href="/favicon-16x16.png"
|
|||
|
|
data-oid="x1:e_kv"
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
<link rel="manifest" href="/site.webmanifest" data-oid="7.i_diy" />
|
|||
|
|
<meta name="theme-color" content="#ffffff" data-oid="pm_y3u3" />
|
|||
|
|
<meta
|
|||
|
|
name="viewport"
|
|||
|
|
content="width=device-width, initial-scale=1"
|
|||
|
|
data-oid="y_ipvze"
|
|||
|
|
/>
|
|||
|
|
</head>
|
|||
|
|
<body className="" data-oid="exc9f3.">
|
|||
|
|
{children}
|
|||
|
|
|
|||
|
|
{/* Google Analytics */}
|
|||
|
|
<Script
|
|||
|
|
src="https://www.googletagmanager.com/gtag/js?id=G-E0ENRQGBZP"
|
|||
|
|
strategy="afterInteractive"
|
|||
|
|
/>
|
|||
|
|
<Script
|
|||
|
|
id="google-analytics"
|
|||
|
|
strategy="afterInteractive"
|
|||
|
|
dangerouslySetInnerHTML={{
|
|||
|
|
__html: `
|
|||
|
|
window.dataLayer = window.dataLayer || [];
|
|||
|
|
function gtag(){dataLayer.push(arguments);}
|
|||
|
|
gtag('js', new Date());
|
|||
|
|
gtag('config', 'G-E0ENRQGBZP');
|
|||
|
|
`
|
|||
|
|
}}
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
{/* AI客服系统 */}
|
|||
|
|
<Script
|
|||
|
|
id="ai-customer-service"
|
|||
|
|
strategy="afterInteractive"
|
|||
|
|
dangerouslySetInnerHTML={{
|
|||
|
|
__html: `(function(d,w,c){if(w[c])return;var s=d.createElement('script');w[c]=function(){(w[c].z=w[c].z||[]).push(arguments);};s.async=true;s.src='https://static.ahc.ink/hecong.js';if(d.head)d.head.appendChild(s);})(document,window,'_AIHECONG');_AIHECONG('ini',{channelId:'9BgJ9p'});`
|
|||
|
|
}}
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
{/* 客服按钮样式强制应用脚本 */}
|
|||
|
|
<Script
|
|||
|
|
id="customer-service-style"
|
|||
|
|
strategy="afterInteractive"
|
|||
|
|
dangerouslySetInnerHTML={{
|
|||
|
|
__html: `
|
|||
|
|
function applyCustomerServiceStyle() {
|
|||
|
|
const iframes = document.querySelectorAll('iframe[src*="ahc.ink"], div[style*="position: fixed"] iframe, div[style*="bottom"] iframe');
|
|||
|
|
iframes.forEach(iframe => {
|
|||
|
|
if (iframe && iframe.style) {
|
|||
|
|
iframe.style.borderRadius = '12px';
|
|||
|
|
iframe.style.boxShadow = '0 2px 12px rgba(79, 156, 249, 0.15)';
|
|||
|
|
iframe.style.border = '1px solid rgba(79, 156, 249, 0.2)';
|
|||
|
|
iframe.style.transition = 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)';
|
|||
|
|
iframe.style.backgroundColor = '#4F9CF9';
|
|||
|
|
|
|||
|
|
iframe.addEventListener('mouseenter', function() {
|
|||
|
|
this.style.transform = 'translateY(-2px)';
|
|||
|
|
this.style.boxShadow = '0 4px 20px rgba(79, 156, 249, 0.3)';
|
|||
|
|
this.style.borderColor = 'rgba(79, 156, 249, 0.5)';
|
|||
|
|
this.style.backgroundColor = '#60A5FA';
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
iframe.addEventListener('mouseleave', function() {
|
|||
|
|
this.style.transform = 'translateY(0)';
|
|||
|
|
this.style.boxShadow = '0 2px 12px rgba(79, 156, 249, 0.15)';
|
|||
|
|
this.style.borderColor = 'rgba(79, 156, 249, 0.2)';
|
|||
|
|
this.style.backgroundColor = '#4F9CF9';
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 页面加载后立即检查
|
|||
|
|
applyCustomerServiceStyle();
|
|||
|
|
|
|||
|
|
// 定期检查新加载的客服组件
|
|||
|
|
setInterval(applyCustomerServiceStyle, 1000);
|
|||
|
|
|
|||
|
|
// 监听DOM变化
|
|||
|
|
if (typeof MutationObserver !== 'undefined') {
|
|||
|
|
const observer = new MutationObserver(applyCustomerServiceStyle);
|
|||
|
|
observer.observe(document.body, {
|
|||
|
|
childList: true,
|
|||
|
|
subtree: true
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
`
|
|||
|
|
}}
|
|||
|
|
/>
|
|||
|
|
</body>
|
|||
|
|
</html>
|
|||
|
|
);
|
|||
|
|
}
|