From 5647b1a0988983c21cfa5c02f33e28f350e759d1 Mon Sep 17 00:00:00 2001 From: zihanjian Date: Sun, 8 Jun 2025 11:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E7=90=86=E6=80=A7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E6=B8=85=E5=8D=95=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E5=86=B3=E7=AD=96=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=80=BB=E8=BE=91=EF=BC=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=9A=84=E5=A4=A7=E9=A2=9D=E6=94=AF=E5=87=BA?= =?UTF-8?q?=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DecisionChecks.tsx | 37 ++++------------------------------- utils/decisionChecks.ts | 9 +-------- 2 files changed, 5 insertions(+), 41 deletions(-) diff --git a/components/DecisionChecks.tsx b/components/DecisionChecks.tsx index 9bc36f4..e4e93f5 100644 --- a/components/DecisionChecks.tsx +++ b/components/DecisionChecks.tsx @@ -2,11 +2,9 @@ import React from 'react'; import { AlertTriangle, Clock, Brain } from 'lucide-react'; import { getCooldownChecks, - getRationalChecklist, getScoreBasedReminders, getRecommendedWaitTime, - CooldownCheckItem, - RationalCheckItem + CooldownCheckItem } from '../utils/decisionChecks'; interface DecisionChecksProps { @@ -21,7 +19,6 @@ const DecisionChecks: React.FC = ({ score }) => { const cooldownChecks = getCooldownChecks(productPrice, adjustments, score); - const rationalChecklist = getRationalChecklist(); const scoreReminders = getScoreBasedReminders(score); const waitTime = getRecommendedWaitTime(parseInt(productPrice) || 0, score); @@ -52,15 +49,7 @@ const DecisionChecks: React.FC = ({ } }; - const getCategoryIcon = (category: RationalCheckItem['category']) => { - switch (category) { - case 'financial': return '💰'; - case 'necessity': return '🎯'; - case 'social': return '👥'; - case 'risk': return '⚡'; - default: return '❓'; - } - }; + const shouldShowCooldownChecks = productPrice && (cooldownChecks.length > 0 || scoreReminders.length > 0); @@ -107,27 +96,9 @@ const DecisionChecks: React.FC = ({ )} - {/* 理性检查清单 */} -
-

- - 理性检查清单 -

-
- {rationalChecklist.map((item, index) => ( -
- {getCategoryIcon(item.category)} - □ {item.question} -
- ))} -
- -
- 💡 建议逐一思考上述问题,每个问题花费1-2分钟 -
-
+ ); }; -export default DecisionChecks; \ No newline at end of file +export default DecisionChecks; diff --git a/utils/decisionChecks.ts b/utils/decisionChecks.ts index 8bf5fbc..6f258dd 100644 --- a/utils/decisionChecks.ts +++ b/utils/decisionChecks.ts @@ -26,14 +26,7 @@ export function getCooldownChecks( return checks; } - // 大额支出检查 - if (price > 5000) { - checks.push({ - condition: true, - message: "大额支出 → 建议等待24小时", - type: 'warning' - }); - } + // 移除重复的大额支出等待时间提示(已在上方显示等待时间) // 限时促销检查 if (adjustments.discount) {