fix: 重新登录缺陷

This commit is contained in:
hzm
2026-03-07 20:18:32 +08:00
parent e5e2e472aa
commit 56e20211e4

View File

@@ -3181,7 +3181,7 @@ export default function HomePage() {
try {
const { data: meta, error: metaError } = await supabase
.from('user_configs')
.select('id, updated_at')
.select(`id, updated_at${checkConflict ? ', data' : ''}`)
.eq('user_id', userId)
.maybeSingle();
@@ -3195,6 +3195,10 @@ export default function HomePage() {
setCloudConfigModal({ open: true, userId, type: 'empty' });
return;
}
if (checkConflict) {
setCloudConfigModal({ open: true, userId, type: 'conflict', cloudData: meta.data });
return;
}
const localUpdatedAt = window.localStorage.getItem('localUpdatedAt');
if (localUpdatedAt && meta.updated_at && new Date(meta.updated_at) < new Date(localUpdatedAt)) {