hongjli
2025-04-08 2785a58a36240c531a41f2feb634102f411b01a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import ClientLayoutContent from '@/components/layout/ClientLayoutContent';
import Script from 'next/script';
 
const inter = Inter({ subsets: ["latin"] });
 
export const metadata: Metadata = {
  title: "帷幄君成 - 数字员工平台",
  description: "智能物流解决方案",
  icons: {
    icon: '/logo.svg',
    apple: '/logo.svg',
  },
};
 
const ScrollToTop = () => {
  return (
    <Script id="scroll-to-top">
      {`
        if (typeof window !== 'undefined') {
          window.onload = function() {
            window.scrollTo(0, 0);
          }
        }
      `}
    </Script>
  );
};
 
export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="zh-CN" className="smooth-scroll">
      <ScrollToTop />
      <body className={`${inter.className} overflow-x-hidden`}>
        <ClientLayoutContent>{children}</ClientLayoutContent>
      </body>
    </html>
  );
}