From d00c8cf3eb4085516006441b9be27de5db793a15 Mon Sep 17 00:00:00 2001 From: hzm <934585316@qq.com> Date: Thu, 12 Mar 2026 20:22:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=83=A8=E5=88=86=E4=BC=B0=E5=80=BC?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=86=85=E5=AE=B9=E5=8E=BB=E9=99=A4=E5=B9=B4?= =?UTF-8?q?=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/CloudConfigModal.jsx | 4 ++-- app/components/FundCard.jsx | 17 +++++++++++++- app/components/MobileFundTable.jsx | 16 +++++++++---- app/components/PcFundTable.jsx | 36 +++++++++++++++++++---------- 4 files changed, 54 insertions(+), 19 deletions(-) diff --git a/app/components/CloudConfigModal.jsx b/app/components/CloudConfigModal.jsx index d62781a..da39be0 100644 --- a/app/components/CloudConfigModal.jsx +++ b/app/components/CloudConfigModal.jsx @@ -41,10 +41,10 @@ export default function CloudConfigModal({ onConfirm, onCancel, type = 'empty' } : '是否将本地配置同步到云端?'}

- -
diff --git a/app/components/FundCard.jsx b/app/components/FundCard.jsx index a929907..75fd361 100644 --- a/app/components/FundCard.jsx +++ b/app/components/FundCard.jsx @@ -34,6 +34,17 @@ const getBrowserTimeZone = () => { const TZ = getBrowserTimeZone(); const toTz = (input) => (input ? dayjs.tz(input, TZ) : dayjs().tz(TZ)); +const formatDisplayDate = (value) => { + if (!value) return '-'; + + const d = toTz(value); + if (!d.isValid()) return value; + + const hasTime = /[T\s]\d{2}:\d{2}/.test(String(value)); + + return hasTime ? d.format('MM-DD HH:mm') : d.format('MM-DD'); +}; + export default function FundCard({ fund: f, todayStr, @@ -126,7 +137,11 @@ export default function FundCard({
{f.noValuation ? '净值日期' : '估值时间'} - {f.noValuation ? (f.jzrq || '-') : (f.gztime || f.time || '-')} + + {f.noValuation + ? formatDisplayDate(f.jzrq) + : formatDisplayDate(f.gztime || f.time)} +