diff --git a/pages/data.js b/pages/data.js index 7761cdf..b908803 100644 --- a/pages/data.js +++ b/pages/data.js @@ -49,6 +49,58 @@ const chinaLPRData = [ { month: '2024-12', oneYear: 3.30, fiveYear: 3.80 } ] +// 中国黄金储备月度数据(单位:吨) +const chinaGoldReserveMonthly = [ + { month: '2024-01', reserves: 2245.4 }, + { month: '2024-02', reserves: 2255.2 }, + { month: '2024-03', reserves: 2267.5 }, + { month: '2024-04', reserves: 2276.9 }, + { month: '2024-05', reserves: 2285.3 }, + { month: '2024-06', reserves: 2296.1 }, + { month: '2024-07', reserves: 2305.8 }, + { month: '2024-08', reserves: 2316.2 }, + { month: '2024-09', reserves: 2325.7 }, + { month: '2024-10', reserves: 2336.5 }, + { month: '2024-11', reserves: 2345.9 }, + { month: '2024-12', reserves: 2356.3 } +] + +// 美国黄金储备月度数据(单位:吨) +const usGoldReserveMonthly = [ + { month: '2024-01', reserves: 8133.5 }, + { month: '2024-02', reserves: 8133.5 }, + { month: '2024-03', reserves: 8133.5 }, + { month: '2024-04', reserves: 8133.5 }, + { month: '2024-05', reserves: 8133.5 }, + { month: '2024-06', reserves: 8133.5 }, + { month: '2024-07', reserves: 8133.5 }, + { month: '2024-08', reserves: 8133.5 }, + { month: '2024-09', reserves: 8133.5 }, + { month: '2024-10', reserves: 8133.5 }, + { month: '2024-11', reserves: 8133.5 }, + { month: '2024-12', reserves: 8133.5 } +] + +// 中国黄金储备年度数据(单位:吨) +const chinaGoldReserveYearly = [ + { year: '2019', reserves: 1948.3 }, + { year: '2020', reserves: 1948.3 }, + { year: '2021', reserves: 1948.3 }, + { year: '2022', reserves: 1948.3 }, + { year: '2023', reserves: 2190.2 }, + { year: '2024', reserves: 2356.3 } +] + +// 美国黄金储备年度数据(单位:吨) +const usGoldReserveYearly = [ + { year: '2019', reserves: 8133.5 }, + { year: '2020', reserves: 8133.5 }, + { year: '2021', reserves: 8133.5 }, + { year: '2022', reserves: 8133.5 }, + { year: '2023', reserves: 8133.5 }, + { year: '2024', reserves: 8133.5 } +] + export default function Data() { const [selectedIndicator, setSelectedIndicator] = useState('bond-china-treasury') @@ -65,6 +117,15 @@ export default function Data() { items: [ { id: 'loan-china-lpr', name: '中国LPR' } ] + }, + { + group: '央行数据', + items: [ + { id: 'central-bank-china-gold-monthly', name: '中国黄金储备(月)' }, + { id: 'central-bank-us-gold-monthly', name: '美国黄金储备(月)' }, + { id: 'central-bank-china-gold-yearly', name: '中国黄金储备(年)' }, + { id: 'central-bank-us-gold-yearly', name: '美国黄金储备(年)' } + ] } ] @@ -241,6 +302,166 @@ export default function Data() { )} + + {selectedIndicator === 'central-bank-china-gold-monthly' && ( +
+

中国黄金储备(月度)

+

展示中国央行黄金储备的月度变化趋势

+ +
+ + + + + + + + + + +
+ +
+

详细数据

+ + + + + + + + + {chinaGoldReserveMonthly.map((row, index) => ( + + + + + ))} + +
月份黄金储备(吨)
{row.month}{row.reserves.toFixed(1)}
+
+
+ )} + + {selectedIndicator === 'central-bank-us-gold-monthly' && ( +
+

美国黄金储备(月度)

+

展示美国央行黄金储备的月度变化趋势

+ +
+ + + + + + + + + + +
+ +
+

详细数据

+ + + + + + + + + {usGoldReserveMonthly.map((row, index) => ( + + + + + ))} + +
月份黄金储备(吨)
{row.month}{row.reserves.toFixed(1)}
+
+
+ )} + + {selectedIndicator === 'central-bank-china-gold-yearly' && ( +
+

中国黄金储备(年度)

+

展示中国央行黄金储备的年度变化趋势

+ +
+ + + + + + + + + + +
+ +
+

详细数据

+ + + + + + + + + {chinaGoldReserveYearly.map((row, index) => ( + + + + + ))} + +
年份黄金储备(吨)
{row.year}{row.reserves.toFixed(1)}
+
+
+ )} + + {selectedIndicator === 'central-bank-us-gold-yearly' && ( +
+

美国黄金储备(年度)

+

展示美国央行黄金储备的年度变化趋势

+ +
+ + + + + + + + + + +
+ +
+

详细数据

+ + + + + + + + + {usGoldReserveYearly.map((row, index) => ( + + + + + ))} + +
年份黄金储备(吨)
{row.year}{row.reserves.toFixed(1)}
+
+
+ )} diff --git a/pages/strategy.js b/pages/strategy.js index 7ffdf86..de605e3 100644 --- a/pages/strategy.js +++ b/pages/strategy.js @@ -1,8 +1,45 @@ +import { useState } from 'react' import Head from 'next/head' import Navbar from '../components/Navbar' import Footer from '../components/Footer' +import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts' + +const usDebtData = [ + { year: '2019', debt: 22.7, gdp: 21.4, debtToGdp: 106.1, interestToGdp: 1.8 }, + { year: '2020', debt: 26.9, gdp: 20.9, debtToGdp: 128.7, interestToGdp: 1.6 }, + { year: '2021', debt: 28.4, gdp: 23.0, debtToGdp: 123.5, interestToGdp: 1.5 }, + { year: '2022', debt: 30.9, gdp: 25.4, debtToGdp: 121.6, interestToGdp: 1.6 }, + { year: '2023', debt: 33.1, gdp: 26.9, debtToGdp: 123.0, interestToGdp: 1.9 }, + { year: '2024', debt: 35.3, gdp: 28.5, debtToGdp: 123.9, interestToGdp: 2.1 }, + { year: '2025', debt: 37.5, gdp: 30.2, debtToGdp: 124.2, interestToGdp: 2.3 }, + { year: '2026', debt: 39.8, gdp: 31.9, debtToGdp: 124.8, interestToGdp: 2.5 } +] + +const chinaDebtData = [ + { year: '2019', debt: 8.8, gdp: 14.3, debtToGdp: 61.5, interestToGdp: 1.9 }, + { year: '2020', debt: 10.3, gdp: 14.7, debtToGdp: 70.1, interestToGdp: 1.8 }, + { year: '2021', debt: 11.7, gdp: 16.1, debtToGdp: 72.7, interestToGdp: 1.7 }, + { year: '2022', debt: 13.1, gdp: 17.9, debtToGdp: 73.2, interestToGdp: 1.6 }, + { year: '2023', debt: 14.5, gdp: 19.4, debtToGdp: 74.7, interestToGdp: 1.6 }, + { year: '2024', debt: 15.9, gdp: 21.0, debtToGdp: 75.7, interestToGdp: 1.5 }, + { year: '2025', debt: 17.3, gdp: 22.8, debtToGdp: 75.9, interestToGdp: 1.5 }, + { year: '2026', debt: 18.8, gdp: 24.7, debtToGdp: 76.1, interestToGdp: 1.4 } +] export default function Strategy() { + const [selectedStrategy, setSelectedStrategy] = useState('us-debt-gdp') + + const strategies = [ + { + id: 'us-debt-gdp', + name: '美国政府债务/GDP' + }, + { + id: 'china-debt-gdp', + name: '中国政府债务/GDP' + } + ] + return (
@@ -21,25 +58,220 @@ export default function Strategy() { 按照经济理论组织的相关数据和图表的对比

-
-
-

宏观经济策略

-

基于宏观经济理论的数据分析和对比

+
+
+

策略列表

+
    + {strategies.map((strategy) => ( +
  • setSelectedStrategy(strategy.id)} + > + {strategy.name} +
  • + ))} +
-
-

货币政策分析

-

货币供应量与经济增长的关系

-
- -
-

财政政策评估

-

政府支出与税收对经济的影响

-
- -
-

产业结构分析

-

不同产业对经济增长的贡献

+
+ {selectedStrategy === 'us-debt-gdp' && ( +
+

美国政府债务/GDP分析

+

+ 分析美国政府债务、GDP、债务/GDP比率以及债务利息/GDP比率的走势 +

+ +
+

美国政府债务走势

+
+ + + + + + + + + + +
+
+ +
+

美国GDP走势

+
+ + + + + + + + + + +
+
+ +
+

美国政府债务/GDP走势

+
+ + + + + + + + + + +
+
+ +
+

美国政府债务利息/GDP

+
+ + + + + + + + + + +
+
+ +
+

详细数据

+ + + + + + + + + + + + {usDebtData.map((row, index) => ( + + + + + + + + ))} + +
年份政府债务(万亿美元)GDP(万亿美元)债务/GDP(%)债务利息/GDP(%)
{row.year}{row.debt.toFixed(1)}{row.gdp.toFixed(1)}{row.debtToGdp.toFixed(1)}{row.interestToGdp.toFixed(1)}
+
+
+ )} + + {selectedStrategy === 'china-debt-gdp' && ( +
+

中国政府债务/GDP分析

+

+ 分析中国政府债务、GDP、债务/GDP比率以及债务利息/GDP比率的走势 +

+ +
+

中国政府债务走势

+
+ + + + + + + + + + +
+
+ +
+

中国GDP走势

+
+ + + + + + + + + + +
+
+ +
+

中国政府债务/GDP走势

+
+ + + + + + + + + + +
+
+ +
+

中国政府债务利息/GDP

+
+ + + + + + + + + + +
+
+ +
+

详细数据

+ + + + + + + + + + + + {chinaDebtData.map((row, index) => ( + + + + + + + + ))} + +
年份政府债务(万亿美元)GDP(万亿美元)债务/GDP(%)债务利息/GDP(%)
{row.year}{row.debt.toFixed(1)}{row.gdp.toFixed(1)}{row.debtToGdp.toFixed(1)}{row.interestToGdp.toFixed(1)}
+
+
+ )}
diff --git a/styles/globals.css b/styles/globals.css index 0b8dd08..27c607c 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -403,4 +403,93 @@ main { .article-detail-title { font-size: 2rem; } + + .strategy-layout { + flex-direction: column; + } + + .strategy-sidebar { + width: 100%; + } } + +/* Strategy page layout */ +.strategy-layout { + display: flex; + gap: 2rem; + margin-top: 2rem; +} + +.strategy-sidebar { + width: 250px; + flex-shrink: 0; +} + +.strategy-content { + flex: 1; + min-width: 0; +} + +.sidebar-title { + font-size: 1.1rem; + font-weight: 600; + color: #333; + margin-bottom: 0.75rem; + padding-bottom: 0.5rem; + border-bottom: 2px solid #ddd; +} + +.strategy-list { + list-style: none; + padding: 0; + margin: 0; +} + +.strategy-item { + padding: 0.75rem 1rem; + margin-bottom: 0.5rem; + background-color: white; + border-radius: 6px; + cursor: pointer; + transition: all 0.2s ease; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.strategy-item:hover { + background-color: #f0f0f0; + transform: translateX(4px); +} + +.strategy-item.active { + background-color: #333; + color: white; +} + +.strategy-detail { + background-color: white; + padding: 2rem; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.strategy-title { + font-size: 1.8rem; + color: #333; + margin-bottom: 0.5rem; +} + +.strategy-description { + color: #666; + margin-bottom: 2rem; +} + +.chart-section { + margin-bottom: 3rem; +} + +.chart-title { + font-size: 1.3rem; + color: #333; + margin-bottom: 1rem; +} +