From ff4a10c84dd2e5e32a4617e56bb29516cd1b6dce Mon Sep 17 00:00:00 2001 From: hzm <934585316@qq.com> Date: Sun, 8 Feb 2026 06:03:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/page.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/page.jsx b/app/page.jsx index 4abb535..d813d42 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -3362,7 +3362,7 @@ export default function HomePage() { try { const payload = collectLocalPayload(); const now = new Date().toISOString(); - const { error: updateError } = await supabase + const { data: upsertData, error: updateError } = await supabase .from('user_configs') .upsert( { @@ -3371,8 +3371,13 @@ export default function HomePage() { updated_at: now }, { onConflict: 'user_id' } - ); + ) + .select(); + if (updateError) throw updateError; + if (!upsertData || upsertData.length === 0) { + throw new Error('同步失败:未写入任何数据,请检查账号状态或重新登录'); + } localStorage.setItem('localUpdatedAt', now);