From 8a62e7383d2fa935de17f8db09649f9589f048a3 Mon Sep 17 00:00:00 2001 From: hzm <934585316@qq.com> Date: Sat, 7 Feb 2026 16:03:33 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=AE=8C=E5=96=84=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=9B=B4=E6=96=B0=E6=A3=80=E6=9F=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/page.jsx | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/app/page.jsx b/app/page.jsx index 134eee8..0f7477c 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -1856,12 +1856,12 @@ export default function HomePage() { // 检查更新 const [hasUpdate, setHasUpdate] = useState(false); const [latestVersion, setLatestVersion] = useState(''); + const [updateContent, setUpdateContent] = useState(''); useEffect(() => { const checkUpdate = async () => { try { const res = await fetch('https://api.github.com/repos/hzm0321/real-time-fund/releases/latest'); - console.log(packageJson.version) if (!res.ok) return; const data = await res.json(); if (data.tag_name) { @@ -1869,6 +1869,7 @@ export default function HomePage() { if (remoteVersion !== packageJson.version) { setHasUpdate(true); setLatestVersion(remoteVersion); + setUpdateContent(data.body || ''); } } } catch (e) { @@ -3579,10 +3580,9 @@ export default function HomePage() { 基估宝
- 项目Github地址 window.open("https://github.com/hzm0321/real-time-fund")} /> {hasUpdate && ( -
setUpdateModalOpen(true)} @@ -3590,6 +3590,7 @@ export default function HomePage() {
)} + 项目Github地址 window.open("https://github.com/hzm0321/real-time-fund")} />
刷新 {Math.round(refreshMs / 1000)}秒 @@ -4837,9 +4838,28 @@ export default function HomePage() { 更新提示
-

- 检测到新版本,是否刷新浏览器以更新 -

+
+

+ 检测到新版本,是否刷新浏览器以更新? +
+ 更新内容如下: +

+ {updateContent && ( +
+ {updateContent} +
+ )} +