mirror of
https://github.com/Zippland/worth-buying.git
synced 2026-01-19 01:21:11 +08:00
重构总分显示组件,增加商品信息展示,优化评分结果布局
This commit is contained in:
32
page.tsx
32
page.tsx
@@ -639,14 +639,6 @@ const PurchaseDecisionCalculator = () => {
|
||||
|
||||
{/* 结果面板 */}
|
||||
<div className="space-y-6">
|
||||
{/* 总分显示 */}
|
||||
<div className={`${advice.color} rounded-lg p-6 text-white`}>
|
||||
<div className="text-center">
|
||||
<div className="text-4xl font-bold mb-2">{calculateScore.toFixed(1)}</div>
|
||||
<div className="text-xl font-semibold mb-1">{advice.text}</div>
|
||||
<div className="text-sm opacity-90">{advice.desc}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 冷静期检查 */}
|
||||
{productPrice && (
|
||||
@@ -699,6 +691,30 @@ const PurchaseDecisionCalculator = () => {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 总分显示 */}
|
||||
<div className={`${advice.color} rounded-lg p-6 text-white`}>
|
||||
<div className="text-center">
|
||||
{/* 商品信息 */}
|
||||
{(productName || productPrice) && (
|
||||
<div className="mb-4 pb-4 border-b border-white/20">
|
||||
<div className="text-lg font-medium opacity-90">
|
||||
{productName || '待评估商品'}
|
||||
</div>
|
||||
{productPrice && (
|
||||
<div className="text-2xl font-bold">
|
||||
¥{parseInt(productPrice).toLocaleString()}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 评分结果 */}
|
||||
<div className="text-4xl font-bold mb-2">{calculateScore.toFixed(1)}</div>
|
||||
<div className="text-xl font-semibold mb-1">{advice.text}</div>
|
||||
<div className="text-sm opacity-90">{advice.desc}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 维度雷达图简化显示 */}
|
||||
<div className="bg-gray-50 rounded-lg p-4">
|
||||
<h4 className="font-semibold mb-3">维度得分概览</h4>
|
||||
|
||||
Reference in New Issue
Block a user