This commit is contained in:
songtianlun 2025-06-14 03:02:48 +08:00
parent fae9eebb03
commit fc9b199aa3
5 changed files with 207 additions and 4 deletions

View File

@ -3,11 +3,66 @@ import Script from 'next/script'
import './globals.css'
import { ThemeProvider } from '@/components/theme-provider'
import NextAuthSessionProvider from '@/components/providers/session-provider'
import StructuredData from '@/components/structured-data'
export const metadata: Metadata = {
title: '个人理财计算器',
description: '帮助您管理和计算理财产品收益',
generator: 'Next.js',
title: {
default: '智能理财计算器 - 专业的投资收益分析工具',
template: '%s | 智能理财计算器'
},
description: '专业的在线理财计算器,支持多币种投资收益计算、年化收益率分析、投资组合管理。帮助您科学规划投资,精准计算理财产品收益,做出明智的投资决策。',
keywords: ['理财计算器', '投资收益计算', '年化收益率', '理财工具', '投资分析', '收益计算', '理财规划', '投资管理'],
authors: [{ name: '智能理财计算器团队' }],
creator: '智能理财计算器',
publisher: '智能理财计算器',
formatDetection: {
email: false,
address: false,
telephone: false,
},
metadataBase: new URL('https://finance-calculator.frytea.com'),
alternates: {
canonical: '/',
},
openGraph: {
type: 'website',
locale: 'zh_CN',
url: 'https://finance-calculator.frytea.com',
title: '智能理财计算器 - 专业的投资收益分析工具',
description: '专业的在线理财计算器,支持多币种投资收益计算、年化收益率分析、投资组合管理。帮助您科学规划投资,精准计算理财产品收益。',
siteName: '智能理财计算器',
images: [
{
url: '/og-image.png',
width: 1200,
height: 630,
alt: '智能理财计算器 - 专业的投资收益分析工具',
},
],
},
twitter: {
card: 'summary_large_image',
title: '智能理财计算器 - 专业的投资收益分析工具',
description: '专业的在线理财计算器,支持多币种投资收益计算、年化收益率分析、投资组合管理。',
images: ['/og-image.png'],
},
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',
},
category: '金融工具',
}
export default function RootLayout({
@ -17,6 +72,9 @@ export default function RootLayout({
}>) {
return (
<html lang="zh-CN">
<head>
<StructuredData />
</head>
<body>
<NextAuthSessionProvider>
<ThemeProvider

View File

@ -1,14 +1,69 @@
import FinanceCalculator from "@/components/finance-calculator"
import { UserNav } from "@/components/auth/user-nav"
import { Metadata } from "next"
export const metadata: Metadata = {
title: "智能理财计算器 - 专业的投资收益分析工具",
description: "免费在线理财计算器,支持多币种投资收益计算、年化收益率分析、投资组合管理。科学规划投资,精准计算理财产品收益,助您做出明智投资决策。",
keywords: ["理财计算器", "投资收益计算", "年化收益率", "理财工具", "投资分析", "收益计算", "理财规划"],
}
export default function Home() {
return (
<main className="container mx-auto py-8 px-4">
<div className="flex justify-between items-center mb-6">
<h1 className="text-3xl font-bold"></h1>
<div>
<h1 className="text-3xl font-bold mb-2"></h1>
<p className="text-lg text-muted-foreground"></p>
</div>
<UserNav />
</div>
<div className="mb-8">
<div className="bg-muted/50 rounded-lg p-6 mb-6">
<h2 className="text-xl font-semibold mb-3"></h2>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 text-sm">
<div className="flex items-center space-x-2">
<span className="w-2 h-2 bg-primary rounded-full"></span>
<span></span>
</div>
<div className="flex items-center space-x-2">
<span className="w-2 h-2 bg-primary rounded-full"></span>
<span></span>
</div>
<div className="flex items-center space-x-2">
<span className="w-2 h-2 bg-primary rounded-full"></span>
<span></span>
</div>
<div className="flex items-center space-x-2">
<span className="w-2 h-2 bg-primary rounded-full"></span>
<span></span>
</div>
<div className="flex items-center space-x-2">
<span className="w-2 h-2 bg-primary rounded-full"></span>
<span></span>
</div>
<div className="flex items-center space-x-2">
<span className="w-2 h-2 bg-primary rounded-full"></span>
<span></span>
</div>
</div>
</div>
</div>
<FinanceCalculator />
<footer className="mt-12 pt-8 border-t">
<div className="text-center text-sm text-muted-foreground">
<p className="mb-2">
线
</p>
<p>
© 2024 . 便
</p>
</div>
</footer>
</main>
)
}

12
app/robots.ts Normal file
View File

@ -0,0 +1,12 @@
import { MetadataRoute } from 'next'
export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: '*',
allow: '/',
disallow: ['/api/', '/admin/'],
},
sitemap: 'https://finance-calculator.frytea.com/sitemap.xml',
}
}

26
app/sitemap.ts Normal file
View File

@ -0,0 +1,26 @@
import { MetadataRoute } from 'next'
export default function sitemap(): MetadataRoute.Sitemap {
const baseUrl = 'https://finance-calculator.frytea.com'
return [
{
url: baseUrl,
lastModified: new Date(),
changeFrequency: 'weekly',
priority: 1,
},
{
url: `${baseUrl}/auth/signin`,
lastModified: new Date(),
changeFrequency: 'monthly',
priority: 0.8,
},
{
url: `${baseUrl}/auth/error`,
lastModified: new Date(),
changeFrequency: 'yearly',
priority: 0.3,
},
]
}

View File

@ -0,0 +1,52 @@
export default function StructuredData() {
const structuredData = {
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "智能理财计算器",
"description": "专业的在线理财计算器,支持多币种投资收益计算、年化收益率分析、投资组合管理",
"url": "https://finance-calculator.frytea.com",
"applicationCategory": "FinanceApplication",
"operatingSystem": "Web Browser",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "CNY"
},
"author": {
"@type": "Organization",
"name": "智能理财计算器团队"
},
"publisher": {
"@type": "Organization",
"name": "智能理财计算器"
},
"featureList": [
"多币种支持",
"投资收益计算",
"年化收益率分析",
"投资组合管理",
"数据安全存储",
"实时收益计算"
],
"screenshot": "https://finance-calculator.frytea.com/screenshot.png",
"softwareVersion": "1.0.0",
"datePublished": "2024-01-01",
"dateModified": new Date().toISOString().split('T')[0],
"inLanguage": "zh-CN",
"isAccessibleForFree": true,
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"ratingCount": "150",
"bestRating": "5",
"worstRating": "1"
}
}
return (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
/>
)
}