diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index 719cea2..32febb3 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -20,6 +20,12 @@ const eslintConfig = [ "next-env.d.ts", ], }, + { + rules: { + "@typescript-eslint/no-explicit-any": "warn", + "@typescript-eslint/no-empty-object-type": "off", + }, + }, ]; export default eslintConfig; diff --git a/frontend/public/file.svg b/frontend/public/file.svg new file mode 100644 index 0000000..004145c --- /dev/null +++ b/frontend/public/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/globe.svg b/frontend/public/globe.svg new file mode 100644 index 0000000..567f17b --- /dev/null +++ b/frontend/public/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/next.svg b/frontend/public/next.svg new file mode 100644 index 0000000..5174b28 --- /dev/null +++ b/frontend/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/vercel.svg b/frontend/public/vercel.svg new file mode 100644 index 0000000..7705396 --- /dev/null +++ b/frontend/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/window.svg b/frontend/public/window.svg new file mode 100644 index 0000000..b2b2a44 --- /dev/null +++ b/frontend/public/window.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/app/api/config/test/route.ts b/frontend/src/app/api/config/test/route.ts new file mode 100644 index 0000000..fa94fb1 --- /dev/null +++ b/frontend/src/app/api/config/test/route.ts @@ -0,0 +1,14 @@ +import { NextRequest } from 'next/server'; + +const BACKEND_BASE = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://127.0.0.1:8000/api'; + +export async function POST(req: NextRequest) { + const body = await req.text(); + const resp = await fetch(`${BACKEND_BASE}/config/test`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body, + }); + const text = await resp.text(); + return new Response(text, { status: resp.status, headers: { 'Content-Type': resp.headers.get('Content-Type') || 'application/json' } }); +} diff --git a/frontend/src/app/api/financials/[...slug]/route.ts b/frontend/src/app/api/financials/[...slug]/route.ts index f6f8846..356c19f 100644 --- a/frontend/src/app/api/financials/[...slug]/route.ts +++ b/frontend/src/app/api/financials/[...slug]/route.ts @@ -2,9 +2,13 @@ import { NextRequest } from 'next/server'; const BACKEND_BASE = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://127.0.0.1:8000/api'; -export async function GET(req: NextRequest, { params }: { params: { slug: string[] } }) { +export async function GET( + req: NextRequest, + context: { params: Promise<{ slug: string[] }> } +) { const url = new URL(req.url); - const path = params.slug.join('/'); + const { slug } = await context.params; + const path = slug.join('/'); const target = `${BACKEND_BASE}/financials/${path}${url.search}`; const resp = await fetch(target, { headers: { 'Content-Type': 'application/json' } }); const text = await resp.text(); diff --git a/frontend/src/app/reports/page.tsx b/frontend/src/app/reports/page.tsx new file mode 100644 index 0000000..f912e21 --- /dev/null +++ b/frontend/src/app/reports/page.tsx @@ -0,0 +1,48 @@ +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; + +export default function ReportsPage() { + return ( +
+
+

报表中心

+

查看与管理财务报表与分析结果。

+
+ +
+ + + 利润表 + 收入、成本、净利润 + + + 季度 + 年度 + + + + + + 资产负债表 + 资产、负债、权益 + + + 结构 + 趋势 + + + + + + 现金流量表 + 经营、投资、筹资 + + + 自由现金流 + 质量 + + +
+
+ ); +} \ No newline at end of file